summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2004-04-21 20:52:40 +0000
committerivan <ivan>2004-04-21 20:52:40 +0000
commit491abb349fbf66731fbc2fd0ff46868c5240e7a8 (patch)
tree8846364d7cd982777ca96bf6a629d874219f56e3
parente9e82b61832cea3b0ca96435197c12414fc6ac9d (diff)
as an invoice event, emailing/printing problems should be fatal and trigger retry
-rw-r--r--FS/FS/cust_bill.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index 591ae0c9c..2639abfae 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -417,9 +417,9 @@ sub send {
$!=0;
$message->smtpsend( Host => $smtpmachine )
or $message->smtpsend( Host => $smtpmachine, Debug => 1 )
- or return "(customer # ". $self->custnum. ") can't send invoice email".
- " to ". join(', ', grep { $_ ne 'POST' } @invoicing_list ).
- " via server $smtpmachine with SMTP: $!";
+ or die "(customer # ". $self->custnum. ") can't send invoice email".
+ " to ". join(', ', grep { $_ ne 'POST' } @invoicing_list ).
+ " via server $smtpmachine with SMTP: $!\n";
}
@@ -429,11 +429,11 @@ sub send {
if ( grep { $_ eq 'POST' } @invoicing_list ) { #postal
open(LPR, "|$lpr")
- or return "Can't open pipe to $lpr: $!";
+ or die "Can't open pipe to $lpr: $!\n";
print LPR @print_text;
close LPR
- or return $! ? "Error closing $lpr: $!"
- : "Exit status $? from $lpr";
+ or die $! ? "Error closing $lpr: $!\n"
+ : "Exit status $? from $lpr\n";
}
'';