Thanks for getting back to me so quickly. If I understood properly, then the change did not work. I moved my case logic back into Main.onException and changed the config accordingly. Main.onException does a redirection to ErrorHandler (routed to error, though this does not seem to be part of my problem as I tried specifying the actual vs routed name).
I am still lost. Why is it redirected to Main.onException twice? I suppose because of the EventHandlerNotRegisteredException that is thrown by the framework. But, why is this thrown when it is not thrown when redirected to default? This does not make any sense to me at all.
---- DEBUG OUTPUT —
[COMMENT: page submitted and is intercepted preprocess]
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:52”,“owners.model.interceptors.dataValidation”,“preProcess”
[COMMENT: the query string is tested to determine if the validation should occur. It does not contain error, so yes it should]
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:52”,“owners.model.interceptors.dataValidation”,“preProcess: findNoCase(’=error.’, cgi.QUERY_STRING) is 0”
[COMMENT: the actual contents of the query string within the pre-process interceptor]
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:52”,“owners.model.interceptors.dataValidation”,“preProcess: cgi.QUERY_STRING isid=1%27%20or%201%20=%201”
[COMMENT: a custom exception was thrown so the process is redirect to Main.onException]
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:52”,“owners.handlers.Main”,“onException”
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:52”,“owners.handlers.Main”,“onException: cgi.QUERY_STRING is id=1%27%20or%201%20=%201”
[COMMENT: the dataInvalid case is taken and the process is redirected to error.dataInvalidError]
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:52”,“owners.handlers.Main”,“onException: case dataInvalid”
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:52”,“owners.handlers.Main”,“onException: exceptionBean.getType() is dataInvalid”
[COMMENT: I guess it makes sense that it would traverse the interceptor again]
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:52”,“owners.model.interceptors.dataValidation”,“preProcess”
[COMMENT: the query string is tested to see if it is an error page being displayed]
[COMMENT: it is, so the offending logic that caused the exception is not executed again]
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:52”,“owners.model.interceptors.dataValidation”,“preProcess: findNoCase(’=error.’, cgi.QUERY_STRING) is 1”
[COMMENT: Why am I back here? Shouldn’t it be in error.dataInvalidError???]
[COMMENT: Apparently error.dataInvalidError is not registered]
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:52”,“owners.handlers.Main”,“onException”
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:52”,“owners.handlers.Main”,“onException: cgi.QUERY_STRING is =error.dataInvalidError”
[COMMENT: EventHandlerNotRegisteredException is not handled by the case, so default executed]
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:52”,“owners.handlers.Main”,“onException: case default”
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:52”,“owners.handlers.Main”,“onException: exceptionBean.getType() is HandlerService.EventHandlerNotRegisteredException”
[COMMENT: Redirecting causes traversal of the interceptor again]
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:52”,“owners.model.interceptors.dataValidation”,“preProcess”
[COMMENT: Odd… Where did the query string go? It had been redirected to error.default]
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:53”,“owners.model.interceptors.dataValidation”,“preProcess: cgi.QUERY_STRING is”
[COMMENT: The query string test doesn’t match, but the data causing the error is gone too]
[COMMENT: No exception gets thrown]
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:53”,“owners.model.interceptors.dataValidation”,“preProcess: findNoCase(’=error.’, cgi.QUERY_STRING) is 0”
[COMMENT: Finally it is in the default method and the default error screen is displayed]
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:53”,“owners.handlers.ErrorHandler”,“default”
“DEBUG”,“fileLog”,“06/22/2010”,“13:15:53”,“owners.handlers.ErrorHandler”,“default: testing for exception bean existence”