mojolicious / mojo

:sparkles: Mojolicious - Perl real-time web framework
https://mojolicious.org
Artistic License 2.0
2.66k stars 577 forks source link

Add exceptions to stash regardless of format #2065

Closed rawleyfowler closed 1 year ago

rawleyfowler commented 1 year ago

Summary

Make it easier to use exceptions, when exception format is not HTML

Motivation

It doesn't make sense for exceptions to be stored in the stash only if the format is HTML, instead it makes more sense, and is more consistent to store them in the stash for all formats

References

fixes #2048

I annihilated my branch on the other PR like a goof #2061 and github auto closed the PR because of it.

rawleyfowler commented 1 year ago

@marcusramberg Had to make a change $e->inspect could break

marcusramberg commented 1 year ago

@marcusramberg Had to make a change $e->inspect could break

Its failing test now?

rawleyfowler commented 1 year ago

@marcusramberg The tests pass, there is a bug with github workflow where it can't find the module if you look at the logs. Not sure.

t/mojolicious/exception_lite_app.t ......... ok

Can't locate Test2/V0.pm in @INC (@INC contains: /__w/mojo/mojo/lib /usr/local/lib/perl5/site_perl/5.16.3/x86_64-linux /usr/local/lib/perl5/site_perl/5.16.3 /usr/local/lib/perl5/5.16.3/x86_64-linux /usr/local/lib/perl5/5.16.3 .) at /usr/local/lib/perl5/site_perl/5.16.3/x86_64-linux/Test/Future/AsyncAwait/Awaitable.pm line 11.
rawleyfowler commented 1 year ago

@kraih Is this failing test my doing or is the @INC broken?