[freeside-commits] freeside/FS/FS Daemon.pm, 1.3, 1.4 Misc.pm, 1.37, 1.38
Mark Wells
mark at wavetail.420.am
Mon Jun 14 22:10:14 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv24725/FS/FS
Modified Files:
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.37
retrieving revision 1.38
diff -u -w -d -r1.37 -r1.38
--- Misc.pm 25 May 2010 06:04:12 -0000 1.37
+++ Misc.pm 15 Jun 2010 05:10:12 -0000 1.38
@@ -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.4
diff -u -w -d -r1.3 -r1.4
--- Daemon.pm 1 Nov 2008 22:12:46 -0000 1.3
+++ Daemon.pm 15 Jun 2010 05:10:12 -0000 1.4
@@ -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