|
|
|
@ -936,15 +936,24 @@ function execute_block(sb::Module, block::String; inputfile::String, fake_source |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
popdisplay(disp) # IOCapture.capture has a try-catch so should always end up here |
|
|
|
popdisplay(disp) # IOCapture.capture has a try-catch so should always end up here |
|
|
|
if c.error && !continue_on_error |
|
|
|
if c.error |
|
|
|
error(""" |
|
|
|
if continue_on_error |
|
|
|
$(sprint(showerror, c.value)) |
|
|
|
err = c.value |
|
|
|
when executing the following code block from inputfile `$(Base.contractuser(inputfile))` |
|
|
|
if err isa LoadError # include_string may wrap error in LoadError |
|
|
|
|
|
|
|
err = err.error |
|
|
|
```julia |
|
|
|
end |
|
|
|
$block |
|
|
|
error_output = "ERROR: " * sprint(showerror, err) |
|
|
|
``` |
|
|
|
return nothing, error_output, disp.data |
|
|
|
""") |
|
|
|
else |
|
|
|
|
|
|
|
error(""" |
|
|
|
|
|
|
|
$(sprint(showerror, c.value)) |
|
|
|
|
|
|
|
when executing the following code block from inputfile `$(Base.contractuser(inputfile))` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```julia |
|
|
|
|
|
|
|
$block |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
""") |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
return c.value, c.output, disp.data |
|
|
|
return c.value, c.output, disp.data |
|
|
|
end |
|
|
|
end |
|
|
|
|