Throw a RuntimeException when a property is not defined or not accessible
instead of returning an error message.
This commit is contained in:
parent
b5bce7b51d
commit
5b51be761f
1 changed files with 3 additions and 3 deletions
|
@ -471,7 +471,7 @@ public final class FesiEvaluator implements ScriptingEngine {
|
|||
String prototypeName = app.getPrototypeName (obj);
|
||||
if ("user".equalsIgnoreCase (prototypeName) &&
|
||||
"password".equalsIgnoreCase (propname))
|
||||
return "[macro access to password property not allowed]";
|
||||
throw new RuntimeException ("access to password property not allowed");
|
||||
|
||||
// if this is a HopObject, check if the property is defined
|
||||
// in the type.properties db-mapping.
|
||||
|
@ -480,7 +480,7 @@ public final class FesiEvaluator implements ScriptingEngine {
|
|||
if (dbm != null) {
|
||||
Relation rel = dbm.propertyToRelation (propname);
|
||||
if (rel == null || !rel.isPrimitive ())
|
||||
return "[property \""+propname+"\" is not defined for "+prototypeName+"]";
|
||||
throw new RuntimeException ("\""+propname+"\" is not defined in "+prototypeName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue