We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1dcc53 commit 41c0d37Copy full SHA for 41c0d37
1 file changed
lib/youplot/command.rb
@@ -63,9 +63,15 @@ def run
63
# normal mode
64
else
65
# Sometimes the input file does not end with a newline code.
66
- while (input = Kernel.gets(nil))
+ begin
67
68
+ input = Kernel.gets(nil)
69
+ rescue Errno::ENOENT => e
70
+ warn e.message
71
+ next
72
+ end
73
main(input)
- end
74
+ end until input
75
end
76
77
@@ -137,6 +143,10 @@ def parse_dsv(input)
137
143
warn 'Please try to set the correct character encoding with --encoding option.'
138
144
warn e.backtrace.grep(/youplot/).first
139
145
exit 1
146
+ rescue ArgumentError => e
147
+ warn 'Failed to parse the text. '
148
+ warn e.backtrace.grep(/youplot/).first
149
+ exit 1
140
150
141
151
142
152
data
0 commit comments