Hi Brad and Aaron,
Thank you for the feedback. I’ve confirmed that we are not using persisting objects past a page request. Brad thanks for the example.
As for the exception handler it’s mapped in the Coldbox.cfc and the mapped handler gathers info from the exceptionBean and CGI var and passes them to the CF error logs.We’ve been unsuccessful in figuring out how to capture a stack trace.
Below is code for the exception handler.
Aaron, unfortunately we can’t see to nail down the file that is causing the error, the path info in the error logs is from all over the site, different users, different handlers and layouts, seemingly no common thread. This just started when we ungraded to build 114, so it seems that is a change in the build that we are somehow not accounting for.
Thanks again for all your thoughts.
code for the exception handler:
var context = exceptionBean.getTagContext();
var contextMessage = ‘’;
if (!arrayIsEmpty(context)) { contextMessage &= context[1].raw_trace;}
var ErrorToLog = [];
arrayAppend(ErrorToLog, ‘Exception Caught by ColdBox’);
arrayAppend(ErrorToLog, exceptionBean.getMessage() );
arrayAppend(ErrorToLog, exceptionBean.getMissingFilename() );
arrayAppend(ErrorToLog, exceptionBean.getDetail() );
arrayAppend(ErrorToLog, exceptionBean.getExtraInfo() );
arrayAppend(ErrorToLog, contextMessage );
arrayAppend(ErrorToLog, ‘http_user_agent=’ & cgi.http_user_agent);
arrayAppend(ErrorToLog, ‘remote_host=’ & cgi.remote_host);
if(trim(cgi.http_referer) NEQ ‘’) { arrayAppend(ErrorToLog, ‘http_referer=’ & cgi.http_referer); }
if(trim(cgi.query_string) NEQ ‘’) { arrayAppend(ErrorToLog, ‘q=’ & cgi.query_string); }
arrayAppend(ErrorToLog, ‘path_info=’ & cgi.path_info);
if(structKeyExists(rc,‘searchText’))
if(trim(rc.searchText) NEQ ‘’) { arrayAppend(ErrorToLog, ‘searchText=’ & rc.searchtext); }
if(structKeyExists(rc,‘page’))
if(trim(rc.page) NEQ ‘’) { arrayAppend(ErrorToLog, ‘page=’ & rc.page); }
writeLog(application=true ,text = arrayToList(ErrorToLog, ’ | ') ,type = ‘Error’ ,file = ‘ColdBoxExceptions’);
Thanks
Tina