marked class as final.

print stack trace on id generation if debug is true.
This commit is contained in:
hns 2002-06-07 19:12:17 +00:00
parent 0652286e82
commit 43cba33077

View file

@ -14,7 +14,7 @@ import java.util.Vector;
* in JavaScript which doesn't know about them (except for the exception message). * in JavaScript which doesn't know about them (except for the exception message).
*/ */
public class WrappedNodeManager { public final class WrappedNodeManager {
NodeManager nmgr; NodeManager nmgr;
@ -125,12 +125,14 @@ import java.util.Vector;
if (map == null || !map.isRelational () || "[hop]".equalsIgnoreCase (map.getIDgen())) if (map == null || !map.isRelational () || "[hop]".equalsIgnoreCase (map.getIDgen()))
return nmgr.idgen.newID (); return nmgr.idgen.newID ();
// or if we query max key value // or if we query max key value
else if (map.getIDgen() == null || "[max]".equalsIgnoreCase (map.getIDgen())) else if (map.getIDgen() == null || "[max]".equalsIgnoreCase (map.getIDgen()))
return nmgr.generateMaxID (map); return nmgr.generateMaxID (map);
else else
return nmgr.generateID (map); return nmgr.generateID (map);
// otherwise, we use an oracle sequence // otherwise, we use an oracle sequence
} catch (Exception x) { } catch (Exception x) {
if (nmgr.app.debug ())
x.printStackTrace();
throw new RuntimeException (x.toString ()); throw new RuntimeException (x.toString ());
} }
} }