-
Notifications
You must be signed in to change notification settings - Fork 111
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
revise(throw=true)
seems to not raise an exception
#541
Comments
I haven't looked at the issue you're reporting, but FYI you might be a better candidate for But I will look at this tomorrow, thanks for reporting. |
I posted this as a documentation issue (JuliaWeb/HTTP.jl#587) for |
Oh, interesting. It looks like the I posted a hint at JuliaWeb/HTTP.jl#587 (comment). I'd guess if you change it, then it will work as you expect. If there's an error partway through the file that's the source of the |
Well, based upon documentation, I was expecting the code fragment above to work, as I need to return 5xx if the changed source files have syntax errors (it'd be great to even show the lines of the errors...). I still think it makes sense for |
With the help of Mark Kittisopikul & Tim Larson on Slack, I got a simple
HTTP.jl
use withRevise.jl
v2.7.6 to work on Julia v1.5.1. When I update my function and press refresh on the browser, I get a properly updated page. Following is the example,hello.jl
which can be run withusing Revise; includet("hello.jl"); serve()
and used by pointing your browser tohttps://127.0.0.1:8080
. I could, for example add exclamation marks toHello World
, save "hello.jl", and when I refresh the browser, it properly updates the display, printing "Revise worked...." on the console.However, if you make an error in this file, say by adding
bug
on line #2, it seems thatRevise.revise(; throw=true)
has interesting behavior: it prints out the failure to its log, but then neglects to throw the error. Indeed, with the code below it still prints "Revise worked..." to the console after printing out the error. You could see this in the source code, at https://github.com/timholy/Revise.jl/blob/v2.7.6/src/Revise.jl#L814-L825 which prints the error... but doesn't seem to throw an exception.Following is the
hello.jl
file... and the console log.The console log...
The text was updated successfully, but these errors were encountered: