File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ def wait_for_output(term, variables)
144
144
output = ''
145
145
until output_ready? ( output , variables )
146
146
begin
147
- term . check_errors
147
+ term . check_errors ( raw : true )
148
148
rescue GnuplotRB ::GnuplotError => e
149
149
output += e . message
150
150
end
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ module ErrorHandling
11
11
##
12
12
# Check if there were errors in previous commands.
13
13
# Throws GnuplotError in case of any errors.
14
- def check_errors
14
+ def check_errors ( raw : false )
15
15
return if @err_array . empty?
16
16
command = ''
17
17
rest = ''
@@ -20,7 +20,11 @@ def check_errors
20
20
rest = @err_array [ 1 ..-1 ] . join ( '; ' )
21
21
@err_array . clear
22
22
end
23
- message = "Error in previous command (\" #{ command } \" ): \" #{ rest } \" "
23
+ message = if raw
24
+ "#{ command } ;#{ rest } }"
25
+ else
26
+ "Error in previous command (\" #{ command } \" ): \" #{ rest } \" "
27
+ end
24
28
fail GnuplotError , message
25
29
end
26
30
You can’t perform that action at this time.
0 commit comments