summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2010-05-25 06:04:12 +0000
committerivan <ivan>2010-05-25 06:04:12 +0000
commit306ebf9299ec7875e51320f1c2d7c2f5bc9dfe2c (patch)
treeaca88a897c6ab658861ffee1c3caefe726adcfc2
parentb7c314a198c60a6f9236950994113aa422aa77ff (diff)
prevent "Can't locate object method "code" via package "HTML::Mason::Exception" errors
-rw-r--r--FS/FS/Misc.pm5
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
+ : $@;
}