more information for OFFLINE_FILE_ERROR collab/phasefx/offline_file_error
authorJason Etheridge <jason@esilibrary.com>
Thu, 14 Jun 2012 21:28:58 +0000 (17:28 -0400)
committerJason Etheridge <jason@esilibrary.com>
Thu, 14 Jun 2012 21:31:39 +0000 (17:31 -0400)
in the params section of the stacktrace

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/src/offline/offline.pl

index f7719d5..bbe7ab9 100755 (executable)
@@ -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 = <F>;
        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";