From 3c8f9f88906b473f0b6e0c088a74448d8be4c037 Mon Sep 17 00:00:00 2001 From: hns Date: Fri, 13 May 2005 15:33:01 +0000 Subject: [PATCH] Throw exception in init() when rootPrototype or userPrototype does not exist. --- src/helma/framework/core/Application.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/helma/framework/core/Application.java b/src/helma/framework/core/Application.java index bf81d2a0..1ab4097d 100644 --- a/src/helma/framework/core/Application.java +++ b/src/helma/framework/core/Application.java @@ -360,9 +360,13 @@ public final class Application implements IPathElement, Runnable { rootId = props.getProperty("rootid", "0"); rootPrototype = props.getProperty("rootprototype", "root"); userPrototype = props.getProperty("userprototype", "user"); - + rootMapping = getDbMapping(rootPrototype); + if (rootMapping == null) + throw new RuntimeException("rootPrototype does not exist: " + rootPrototype); userMapping = getDbMapping(userPrototype); + if (userMapping == null) + throw new RuntimeException("userPrototype does not exist: " + userPrototype); // The whole user/userroot handling is basically old // ugly obsolete crap. Don't bother.