summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2004-04-21 20:52:32 +0000
committerivan <ivan>2004-04-21 20:52:32 +0000
commit04c0875f27d36309b6d8da8063a9254fef3a7398 (patch)
tree27bb1a9758cf8f84a6a348cbc2eb6cce6e5a106b
parent896617d061b92dc9c324e51c4adcb3184adbc259 (diff)
as an invoice event, emailing/printing problems should be fatal and trigger retry
-rw-r--r--FS/FS/cust_bill.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index a3e76620e..7e2c8fb55 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -339,7 +339,7 @@ sub send {
'subject' => 'Invoice',
'body' => \@print_text,
);
- return "can't send invoice: $error" if $error;
+ die "can't email invoice: $error\n" if $error;
}
@@ -350,11 +350,11 @@ sub send {
if ( grep { $_ eq 'POST' } @invoicing_list ) { #postal
my $lpr = $conf->config('lpr');
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";
}
'';