Having a new (to me) problem with uncaught excepti...
# lucee
j
Having a new (to me) problem with uncaught exception on 6.2.1.122. This is on a legacy Fusebox 5 application. When there is an unhandled exception that bubbles all the way up, the resulting dump has a what looks like a (JS?) variable declaration included at the top. The usual stack trace is under that forcing everyone to scroll tons to see errors on the local development environment. The app handles error fairly standard - it has a global onError in it's own Application.cfc, when it detects that it's not in production mode it throws the original exception
throw arguments.exception;
this then gets intercepted by Fusebox's own Application.cfc's onError which we didn't customize (https://github.com/fusebox-framework/Fusebox-ColdFusion/blob/master/corefiles/Application.cfc) and thrown again. On 6.0.1.83, I get the expected output with a stack starting with the usual Lucee 6.0.1.83 Error (Application) followed by the stack - although I know just realized this has never been styled as a regular dump like the apps that aren't written on Fusebox! I looked into why that might be this evening, but to no avail. It also works on: 6.1.1.118 6.2.0-SNAPSHOT+300 but breaks from 6.2.0+321
doing additional testing to find from which exact snapshot it breaks in 6.2.0
z
hmmm, are there some form or ajax tags in the mix?
j
6.2.0-SNAPSHOT+303 - works 6.2.0-SNAPSHOT+304 - break I initially thought about ajax since we render the error in a dialog, but it seems to be happening on a straight fuseaction call as well. If I dump the exception and abort after I get the expected output.
and by work, I mean I get the output without the added output at the top. It is not stylized, but I now realized it never was in our fusebox app and never thought much of it. I'll try to simplify this further soon and report what I find.
z
nice work triaging, let me check
that file can be debugged / edited locally to figire out the problem lucee\tomcat\lucee-server\context\context\templates\erro\error.cfm
👍 1
j
Yeah I can reproduce it in both of our fusebox app with just a regular call. Let me have a look at that file and see what I find.
z
it's an error in the error handling, my favourite types
😄 1
can you change line 185 to
Copy code
return serializeJSON(catchi);}catch(e) {
		content reset="yes"; dump(e); abort;
	}
j
return serializeJSON(catchi);}catch(e) {dump(e);}
by
return serializeJSON(catchi);}catch(e) {
content reset="yes"; dump(e); abort;
}
Same result. I got pulled in a meeting, now I'm here.
z
something is erroring in that function
j
just reformatting some of it so I can read it better now
z
hehehe
i get
when i wack a
throw "zac"
in the middle of the function
is there a asdf string in that template???
j
I can get it in the catch if I manually throw in the luceeCatchToString as well. If I don't throw it doesn't show anything from the dump though. asdf in which template?
z
error.cfm? is that's was in your screenshot?
image.png
j
oh, it was just a `throw(type="custom", message="asdf") to test
z
ah ok
j
sure give me a sec
back
https://luceeserver.atlassian.net/browse/LDEV-5603 https://github.com/lucee/Lucee/pull/2570 Hopefully I did that PR right! Jira allowed me to create a branch directly into the Lucee/lucee repository which I didn't expect! I did a regular fork/pr after.
👍 1
z
Merged in 6.2.2.27-SNAPSHOT, Welcome as first time code contributor to Lucee!
👍 3
🎉 1