-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build crashes if a cell errors #73
Comments
Exactly my thoughts! Thank you for trying it out! 😄
I think that that is also what I would do. To hide the clunkiness from the reader, you can maybe use "Helper function to show error and stacktrace to the reader."
function error_and_stacktrace(e::Exception)
trace = sprint(io -> Base.show_backtrace(io, backtrace()))
err = sprint(showerror, e)
return string(err, trace) |> Base.Text
end try # hide
sum(1, 2)
catch e # hide
error_and_stacktrace(e) # hide
end # hide |
Ahh cool, didn't know about the |
You're welcome Can this issue be closed? 🙂 |
Oh yeah, go ahead – sorry for delay replying to this! |
Thanks for an awesome package, this is perfect for integrating code into my docs site, and way less fiddly than trying to do everything with doctests.
I'm using this to make a tutorial/demo for how to use my package and I was hoping to show how a particular thing throws an error and how to do it correctly, but it seems that as soon as an error is thrown in the evaluation, the build stops rather than finishing. Is there a way to force it to forge ahead anyway?
(For the moment I've just put that cell inside a
try-catch
and then@show
the caught error which is a reasonable interim solution, but does look slightly clunkier - point being this is by no means an urgent thing to address)The text was updated successfully, but these errors were encountered: