mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-05 22:31:11 +08:00
Improved error messages2
This commit is contained in:
parent
9d58b1aaf9
commit
c4d31108bb
@ -128,10 +128,18 @@ module Uplot
|
||||
if series.size == 1
|
||||
warn "uplot: There is only one series of input data. Please check the delimiter."
|
||||
warn ""
|
||||
warn " Headers: \e[35m#{data.headers.inspect}\e[0m"
|
||||
warn " The first item is: \e[35m\"#{series[0][0]}\"\e[0m"
|
||||
warn " The last item is : \e[35m\"#{series[0][-1]}\"\e[0m"
|
||||
exit 1
|
||||
end
|
||||
if fmt == 'xyxy' && series.size.odd?
|
||||
warn "uplot: In the xyxy format, the number of series must be even."
|
||||
warn ""
|
||||
warn " Number of series: \e[35m#{series.size}\e[0m"
|
||||
warn " Headers: \e[35m#{data.headers.inspect}\e[0m"
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user