Cfcatch problem

not sure if I posted this in the correct category. We just moved from railo to lucee.
when an error occurs we use cfcatch and with that we cfmailed the error to ourselves, we simply put:
cfdump var="#cfcatch#" inside cfmail and it would simply email the dump

but now the email is firing (therefore catching an error) however the email is completely blank, nothing in it.

What am I missing ?

It seems like cfcatch is not ‘working’

also checking the logs there’s nothing there for that event

any help would be appreciated

thanks

Which version of Lucee have you migrated to? I’ve tried the following on 4.5 and 5.1 and it seems to work ok.

<cftry>
	<cfoutput>#test# <!--- Undefined variable ---></cfoutput>
	<cfcatch type="any">
		<cfmail from="tests@test.dev" to="errors@test.dev" subject="Something went wrong"><cfdump var="#cfcatch#"></cfmail>
	</cfcatch>
</cftry>

There was a recent change to dump to make it smaller and faster, but the side affect is that it won’t work in emails due to requiring JS to be executed.

There’s a couple of workarounds in this thread:

I think the change has also been reverted and should be available in the next release.

2 Likes

Was the JS change to CFDUMP reverted. This is one of the main things preventing us from upgrading to 5.2.

Thanks.

I’m pretty sure this was addressed in 5.2.2.71 here:

http://bugs.lucee.org/browse/LDEV-1317

We are running 5.2.3.35 and have no issues sending html emails containing CFDUMP.

For emails I use
<cfdump var=“#cfcatch#” format=“simple”>