Thanks for the suggestions. On #2, what are your thoughts on adding the actual error object to the ExceptionBean? That way, the duplicate can still occur but the exception object will still be available as well.
Well, if you are going to leave in the original error object, I wouldn’t see any point in leaving the duplicated version as well.
#3, though messy, is intriguing to me as well. I might have to explore that a bit, just for fun
Yes, the reason it took me a bit to respond is because I actually got off in the weeds playing with that option just to see if you could do it. I eventually got caught up on my inferior grasp of regex. Basically, I was looping over the string stackTrace as a list with chr(10)&chr(13) as the delimiter. Then trying (unsuccessfully) to break out each line item which looks something like this:
coldfusion.runtime.CfJspPage._get(CfJspPage.java:377)
into its separate parts which would look something like this:
className: coldfusion.runtime.CfJspPage
methodName: _get
fileName: CfJspPage.java
lineNumber: 377
You can create a StackTraceElement like so once you have all the peices:
createObject(“java”, “java.lang.StackTraceElement”).init(“declaringClass”,“methodName”,“fileName”, lineNumber)
Like I said, I would consider that a last resort, but if you wanted to keep from touching the legacy site at all costs, and didn’t want to fiddle with core ColdBox, it should work.
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com