[freeside-commits] freeside/FS/FS Daemon.pm, 1.3, 1.3.4.1 Misc.pm, 1.33.4.3, 1.33.4.4
Mark Wells
mark at wavetail.420.am
Mon Jun 14 22:10:36 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv24765/FS/FS
Modified Files:
Tag: FREESIDE_1_9_BRANCH
Daemon.pm Misc.pm
Log Message:
RT#7869: fix error messages when send_email fails in the job queue
Index: Misc.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Misc.pm,v
retrieving revision 1.33.4.3
retrieving revision 1.33.4.4
diff -u -w -d -r1.33.4.3 -r1.33.4.4
--- Misc.pm 25 May 2010 06:04:13 -0000 1.33.4.3
+++ Misc.pm 15 Jun 2010 05:10:34 -0000 1.33.4.4
@@ -354,11 +354,15 @@
$transport = Email::Sender::Transport::SMTP->new( %smtp_opt );
}
- eval { sendmail($message, { transport => $transport }); };
- ref($@) eq 'Email::Sender::Failure'
- ? ( $@->code ? $@->code.' ' : '' ). $@->message
- : $@;
+ local $@; # just in case
+ eval { sendmail($message, { transport => $transport }) };
+ if(ref($@) and $@->isa('Email::Sender::Failure')) {
+ return ($@->code ? $@->code.' ' : '').$@->message
+ }
+ else {
+ return $@;
+ }
}
=item send_fax OPTION => VALUE ...
Index: Daemon.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Daemon.pm,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -u -w -d -r1.3 -r1.3.4.1
--- Daemon.pm 1 Nov 2008 22:12:46 -0000 1.3
+++ Daemon.pm 15 Jun 2010 05:10:34 -0000 1.3.4.1
@@ -83,6 +83,7 @@
}
sub _die {
+ die @_ if $^S; # $^S = 1 during an eval(), don't break exception handling
my $msg = shift;
unlink $pid_file if -e $pid_file;
_logmsg($msg);
More information about the freeside-commits
mailing list