First call to 'before_render' callback when exception occur does not have $c->stash->{ snapshot } defined (when 'exception.development' template is tried). Following calls has (when 'exception', 'mojo/debug' are tried)
in contrary $_[1]->{ snapshot } is defined for all those cases
is this expected that { snapshot } is not defined?
ah, I have found. That is because of $c->render_maybe implicitly sets up stash keys which are consistent between calls
http://paste.scsys.co.uk/540704
and stash should be localized here: https://github.com/KES777/mojo/blob/master/lib/Mojolicious/Controller.pm#L169 in same way as it is localized when { mojo.string }: https://github.com/KES777/mojo/blob/master/lib/Mojolicious/Renderer.pm#L83