From 558c5a5660dc5996330554307975e08cb7e7f448 Mon Sep 17 00:00:00 2001 From: hns Date: Wed, 16 Oct 2002 13:25:36 +0000 Subject: [PATCH] Print/rethrow full exception string when an exception is caught from NodeWrapper, since the exception message without the exception class is often not very telling (e.g. "128" in ArrayIndexOutOfBoundsExceptions). --- .../objectmodel/db/WrappedNodeManager.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/helma/objectmodel/db/WrappedNodeManager.java b/src/helma/objectmodel/db/WrappedNodeManager.java index 7efc070a..5a425bac 100644 --- a/src/helma/objectmodel/db/WrappedNodeManager.java +++ b/src/helma/objectmodel/db/WrappedNodeManager.java @@ -32,10 +32,10 @@ import java.util.Vector; } catch (ObjectNotFoundException x) { return null; } catch (Exception x) { - nmgr.app.logEvent ("Error retrieving Node via DbMapping: "+x.getMessage ()); + nmgr.app.logEvent ("Error retrieving Node via DbMapping: "+x); if (nmgr.app.debug ()) x.printStackTrace(); - throw new RuntimeException ("Error retrieving Node: "+x.getMessage ()); + throw new RuntimeException ("Error retrieving Node: "+x); } } @@ -45,10 +45,10 @@ import java.util.Vector; } catch (ObjectNotFoundException x) { return null; } catch (Exception x) { - nmgr.app.logEvent ("Error retrieving Node \""+id+"\" from "+home+": "+x.getMessage ()); + nmgr.app.logEvent ("Error retrieving Node \""+id+"\" from "+home+": "+x); if (nmgr.app.debug ()) x.printStackTrace(); - throw new RuntimeException ("Error retrieving Node: "+x.getMessage ()); + throw new RuntimeException ("Error retrieving Node: "+x); } } @@ -58,7 +58,7 @@ import java.util.Vector; } catch (Exception x) { if (nmgr.app.debug ()) x.printStackTrace(); - throw new RuntimeException ("Error retrieving Nodes: "+x.getMessage ()); + throw new RuntimeException ("Error retrieving Nodes: "+x); } } @@ -68,7 +68,7 @@ import java.util.Vector; } catch (Exception x) { if (nmgr.app.debug ()) x.printStackTrace(); - throw new RuntimeException ("Error retrieving NodeIDs: "+x.getMessage ()); + throw new RuntimeException ("Error retrieving NodeIDs: "+x); } } @@ -78,7 +78,7 @@ import java.util.Vector; } catch (Exception x) { if (nmgr.app.debug ()) x.printStackTrace(); - throw new RuntimeException ("Error counting Node: "+x.getMessage ()); + throw new RuntimeException ("Error counting Node: "+x); } } @@ -88,7 +88,7 @@ import java.util.Vector; } catch (Exception x) { if (nmgr.app.debug ()) x.printStackTrace(); - throw new RuntimeException ("Error deleting Node: "+x.getMessage ()); + throw new RuntimeException ("Error deleting Node: "+x); } } @@ -98,7 +98,7 @@ import java.util.Vector; } catch (Exception x) { if (nmgr.app.debug ()) x.printStackTrace(); - throw new RuntimeException ("Error retrieving property names: "+x.getMessage ()); + throw new RuntimeException ("Error retrieving property names: "+x); } }