error handling

Hi guys,

I’ve been following and downloading the updates on GitHub lately and now my onError function in my BaseHandler seem to be blowing up.

I have a handler called User.cfc which extends BaseHandler.cfc. I’m purposely throwing an error in my User Handler to test this issue.

BaseHandler.cfc has the following onError function, which was working fine until a few days ago:

var rc = event.getCollection();

// Setup the results
rc.results.error = true;
rc.results.messages = “The action:#arguments.faultaction# failed: #arguments.exception.detail# #arguments.exception.message#”;

// Log it
log.error(rc.results.messages, exception);

// Headers
setHeader(500,“The action:#arguments.faultaction# failed: #arguments.exception.detail# #arguments.exception.message#”);
rc.results.setStatusCode(500);
rc.results.setData(exception);

postHandler(event);

If I rename this function or comment it out I receive the exception that is thrown gives me an accurate description of the error that occurs. however if I leave it named as is I receive the following error every time, regardless of if it an error occurs in a model, handler, service, etc.

Application Execution ExceptionError Type: Expression : [N/A]

Error Messages: Variable E is undefined.

Tag Context:
ID: ??
LINE: 629
Template: /Library/WebServer/Documents/frameworks/coldbox/system/web/Controller.cfc
ID: CF_TEMPLATEPROXY
LINE: 226
Template: /Library/WebServer/Documents/frameworks/coldbox/system/Coldbox.cfc
ID: CF_UDFMETHOD
LINE: 68
Template: /Library/WebServer/Documents/myapp/Application.cfc
Framework Snapshot
Current Event: User.getUser
Current Layout: N/A
Current View: N/A
Bug Date: 12/08/2010 08:02:27 PM
Coldfusion ID: CFID=12739 ; CFToken=31175457 ; JSessionID=MYAPP_580E5F528360F62521A9DFA9FA175C30_12739_31175457
Template Path : /Library/WebServer/Documents/myapp/index.cfm
Path Info : /user/1.json
Host & Server:

Query String:
Browser: http4e/4.0.1
Stack Trace:

coldfusion.runtime.UndefinedVariableException: Variable E is undefined.
	at coldfusion.runtime.CfJspPage._get(CfJspPage.java:303)
	at coldfusion.runtime.CfJspPage._get(CfJspPage.java:283)
	at coldfusion.runtime.CfJspPage._autoscalarize(CfJspPage.java:1494)
	at coldfusion.runtime.CfJspPage._autoscalarize(CfJspPage.java:1471)
	at cfController2ecfc1224529992$funcRUNEVENT.runFunction(/Library/WebServer/Documents/frameworks/coldbox/system/web/Controller.cfc:629)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
	at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:517)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:496)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:355)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2301)
	at cfColdbox2ecfc2104022983$funcPROCESSCOLDBOXREQUEST.runFunction(/Library/WebServer/Documents/frameworks/coldbox/system/Coldbox.cfc:226)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
	at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2582)
	at cfApplication2ecfc1523304759$funcONREQUESTSTART.runFunction(/Library/WebServer/Documents/myapp/Application.cfc:68)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
	at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:88)
	at coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:258)
	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:349)
	at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:94)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
	at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79)
	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
	at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
	at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
	at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
	at coldfusion.CfmServlet.service(CfmServlet.java:200)
	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
	at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
	at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
	at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
	at jrun.servlet.FilterChain.service(FilterChain.java:101)
	at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
	at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
	at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
	at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
	at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
	at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
	at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

Extra Information Dump
[N/A]

I’ve even tried commenting out the entire contents of the onError function, and I still receive the above error. It’s only when I remove the method completely that i’m able to see the actual exception that has occurred.

Any idea what’s up with this? Did something change in the exception handling in the latest build?

Thanks.

Nolan

Thanks, I fixed it and pushed it

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Awesome. Thanks Luis!