On Friday, September 9, 2016 at 12:25:15 AM UTC-7, Ævar Arnfjörð Bjarmason 
> This is not Plack specific, but in general in Perl: 
> my $stack; 
> local $SIG{__DIE__} = sub { $stack = longmess() }; 
> eval { code(); 1 } 
> or do { 
>     my $error = $@ || "Zombie Error"; 
>     say "You had an error with stack $stack"; 
> }; 
> You probably want to chop off the stack bits that land you in the 
> __DIE__ handler itself, and this gets quite tricky in some situations. 

Thanks, I have tried various forms of that. The problem is getting 
Plack::Middleware::StackTrace to *use* that stack info in it's formatting.
When I rethrow the exception, it displays a big wall of text (the 
longmess), followed by a beautifully formatted stack trace of the call 
stack where the error was rethrown. 

I think I need a way to modify the exception that 
Plack::Middleware::StackTrace sees in its DIE handler before it receives 
I suppose maybe I could add another middleware that appends data to the 
response. Egh.


You received this message because you are subscribed to the Google Groups 
"psgi-plack" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to psgi-plack+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to