Throw exception in init() when rootPrototype or userPrototype does not exist.
This commit is contained in:
parent
525739eaa5
commit
3c8f9f8890
1 changed files with 5 additions and 1 deletions
|
@ -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.
|
||||||
|
|
Loading…
Add table
Reference in a new issue