diff options
author | ivan <ivan> | 2010-05-25 06:04:12 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-05-25 06:04:12 +0000 |
commit | 306ebf9299ec7875e51320f1c2d7c2f5bc9dfe2c (patch) | |
tree | aca88a897c6ab658861ffee1c3caefe726adcfc2 | |
parent | b7c314a198c60a6f9236950994113aa422aa77ff (diff) |
prevent "Can't locate object method "code" via package "HTML::Mason::Exception" errors
-rw-r--r-- | FS/FS/Misc.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/FS/FS/Misc.pm b/FS/FS/Misc.pm index d973feb9f..b275c9dfc 100644 --- a/FS/FS/Misc.pm +++ b/FS/FS/Misc.pm @@ -355,8 +355,9 @@ sub send_email { } eval { sendmail($message, { transport => $transport }); }; - ref($@) ? ( $@->code ? $@->code.' ' : '' ). $@->message - : $@; + ref($@) eq 'Email::Sender::Failure' + ? ( $@->code ? $@->code.' ' : '' ). $@->message + : $@; } |