added check to make sure log line didn't kill things
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 17 Mar 2005 18:32:03 +0000 (18:32 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 17 Mar 2005 18:32:03 +0000 (18:32 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@243 9efc2488-bf62-4759-914b-345cdb29e865

src/perlmods/OpenSRF/Application.pm

index ca3230c..34b41bd 100644 (file)
@@ -387,7 +387,10 @@ sub run {
                        $resp = $code->($self, $req, @params);
                } catch Error with {
                        my $e = shift;
-                       $log->error("Sub $$self{package}::$$self{method} DIED!!!\n\t$e\n".Carp::longmess(), ERROR);
+                       warn "Caught Error in Application: $e\n";
+                       if( ref($self) eq 'HASH') {
+                               $log->error("Sub $$self{package}::$$self{method} DIED!!!\n\t$e\n", ERROR);
+                       }
                        die $e;
                };