-
Notifications
You must be signed in to change notification settings - Fork 580
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
Morbo issues with Mojolicious 9.34 (change in Mojo/Server.pm) #2110
Comments
I'm wondering if it should make sense to run both the |
haarg
added a commit
to haarg/mojo
that referenced
this issue
Sep 19, 2023
When switching from loading an application from using require to using do, the error was still trying to be captured after a surrounding eval. This error would always be empty, because the error from the do was not rethrown. It would still result in an undef application, so an error would be thrown, but it would not include the actual compile error. Change the do call inside the eval to throw an error if no application is returned. The error is then recaught outside the eval. Also add a test that shows that the real compilation error is included in the output. Fixes mojolicious#2110
haarg
added a commit
to haarg/mojo
that referenced
this issue
Sep 19, 2023
When switching from loading an application from using require to using do, the error was still trying to be captured after a surrounding eval. This error would always be empty, because the error from the do was not rethrown. It would still result in an undef application, so an error would be thrown, but it would not include the actual compile error. Change the do call inside the eval to throw an error if no application is returned. The error is then recaught outside the eval. Also add a test that shows that the real compilation error is included in the output. Fixes mojolicious#2110
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce the behavior
Inspired by the example in #2094
Then run with
morbo
Expected behavior
Something like
Actual behavior
Instead I get
Which makes debugging ones own mistakes rather hard.
Note that the problem is related to #2097 which changed
in
Mojo/Server.pm
into(plus some extra checks).
Manually changing
do
back intorequire
makesmorbo
behave like normal.The text was updated successfully, but these errors were encountered: