[Catalyst] Catalyst Exception received by e-mail?

Ash Berlin ash_cpan at firemirror.com
Tue Mar 27 17:11:49 GMT 2007


Dylan Vanderhoof wrote:
> I'm sure there's a better way to do it, but I have some code in
> Root->end() that effectivly does (pseudocode):
> 
> If( $error && !$debug ) {
>    email_stacktrace();
>    clear_error();
>    template = 'default_error.tt';
> }
> 
> The one problem with doing it like that is that if you die in the view
> somewhere, you don't get emailed.  I haven't had time to look into it
> much further since we almost never have a failure in the view.
> 
> -D
> 
>> -----Original Message-----
>> From: Igor Longagnani [mailto:i.longagnani at synervis.it] 
>> Sent: Tuesday, March 27, 2007 8:12 AM
>> To: catalyst at lists.rawmode.org
>> Subject: [Catalyst] Catalyst Exception received by e-mail?
>>
>>
>> Hi,
>> still a rookie here; some time has passed since my last question,
>> because i had many other things to do,
>> but now I am back with many questions and really few answers :) 
>> Iam sure You can help, let's say you almost always did :)
>>
>>  I should force my Catalyst based app to send an e-mail on every
>> exception/error,
>>  just before sending it (the exception) out on the video when 
>> the app dies.
>> I mean I'd like to see the exception both on the screen and 
>> on e-mail. I
>> like those complete scrolling screens
>> when something bad happens ...
>>
>> Well Catalyst helps me a lot in not making errors but ... 
>> thats why I'd
>> love to be notified when it happens
>> I thought someone had already put something to extend Catalyst
>> Exception, but i wasnt able to find nothing appropriate.
>>
>> Any clue?
>>
>> Thanks in advance,
>> Igor
>>
>>
>> -- 
>> Igor Longagnani c/o Synervis
>> -------------------------------------------------------------------
>> e-mail: i.longagnani at synervis.it             phone : +39 059 558442
>>
>> sede operativa: via Pirandello, 49/51 - 41043 Formigine (Mo) Italia
>>

Look at finazlie_error(s?) in Catalyst (you'd create a sub 
finalize_error in MyApp.pm) for a better place to do this

ash



More information about the Catalyst mailing list