From: Jason Etheridge Date: Thu, 14 Jun 2012 21:28:58 +0000 (-0400) Subject: more information for OFFLINE_FILE_ERROR X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fcollab%2Fphasefx%2Foffline_file_error;p=working%2FEvergreen.git more information for OFFLINE_FILE_ERROR in the params section of the stacktrace Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/src/offline/offline.pl b/Open-ILS/src/offline/offline.pl index f7719d5741..bbe7ab9a7d 100755 --- a/Open-ILS/src/offline/offline.pl +++ b/Open-ILS/src/offline/offline.pl @@ -224,7 +224,7 @@ sub ol_load { qx/mkdir -p $outdir/; my $x = 0; - open(FILE, ">>$outfile") or ol_handle_event('OFFLINE_FILE_ERROR'); + open(FILE, ">>$outfile") or ol_handle_event('OFFLINE_FILE_ERROR', 'outfile' => ">>$outfile"); while( <$handle> ) { print FILE; $x++;} close(FILE); @@ -431,7 +431,7 @@ sub ol_execute { sub ol_file_to_perl { my $fname = shift; - open(F, "$fname") or ol_handle_event('OFFLINE_FILE_ERROR'); + open(F, "$fname") or ol_handle_event('OFFLINE_FILE_ERROR', 'fname' => "$fname"); my @d = ; my @p; push(@p, OpenSRF::Utils::JSON->JSON2perl($_)) for @d; @@ -513,7 +513,7 @@ sub ol_append_result { if(!$rhandle) { open($rhandle, ">>$basedir/pending/$org/$seskey/results") - or ol_handle_event('OFFLINE_FILE_ERROR'); + or ol_handle_event('OFFLINE_FILE_ERROR', 'append_path' => ">>$basedir/pending/$org/$seskey/results"); } print $rhandle "$obj\n";