Check if onRequest is defined for the current object before calling it.

This commit is contained in:
hns 2002-10-23 15:41:15 +00:00
parent 18926fb8e0
commit 38eb79123d

View file

@ -239,7 +239,8 @@ public final class RequestEvaluator implements Runnable {
// try calling onRequest() function on object before // try calling onRequest() function on object before
// calling the actual action // calling the actual action
try { try {
scriptingEngine.invoke (currentElement, "onRequest", new Object[0], false); if (scriptingEngine.hasFunction (currentElement, "onRequest"))
scriptingEngine.invoke (currentElement, "onRequest", new Object[0], false);
} catch (RedirectException redir) { } catch (RedirectException redir) {
throw redir; throw redir;
} catch (Exception ignore) { } catch (Exception ignore) {