Throw exception in init() when rootPrototype or userPrototype does not exist.

This commit is contained in:
hns 2005-05-13 15:33:01 +00:00
parent 525739eaa5
commit 3c8f9f8890

View file

@ -360,9 +360,13 @@ public final class Application implements IPathElement, Runnable {
rootId = props.getProperty("rootid", "0"); rootId = props.getProperty("rootid", "0");
rootPrototype = props.getProperty("rootprototype", "root"); rootPrototype = props.getProperty("rootprototype", "root");
userPrototype = props.getProperty("userprototype", "user"); userPrototype = props.getProperty("userprototype", "user");
rootMapping = getDbMapping(rootPrototype); rootMapping = getDbMapping(rootPrototype);
if (rootMapping == null)
throw new RuntimeException("rootPrototype does not exist: " + rootPrototype);
userMapping = getDbMapping(userPrototype); userMapping = getDbMapping(userPrototype);
if (userMapping == null)
throw new RuntimeException("userPrototype does not exist: " + userPrototype);
// The whole user/userroot handling is basically old // The whole user/userroot handling is basically old
// ugly obsolete crap. Don't bother. // ugly obsolete crap. Don't bother.