onError in Application.cfc

I am having a problem when onError occurs in my Application.cfc file. I have it set to email me with a cfdump of url, form, application, session scope etc. However when I get the email it just has the h2 headings for each of the scopes, nothing gets dumped (no sign off cfdump running). This is on a production server, when I try the same code on a development server it works fine. Is there a setting in the admin console to switch of cfdump?
This only appeared since I migrated from version 4 Lucee server to version 5.
Any help would be appreciated
Thanks Mark

I think the dump output was rewritten at some point during Lucee 5 development so that it’s faster and smaller output, but the downside is that it only works in a browser that will run JS, which means it won’t work in your emails.

There’s a couple of workarounds that might help you in the short term;

  1. Try dumping using text format
<cfdump var="#server#" format="text">
  1. If you need to read the contents of those emails now, see if you can open the raw email. Hopefully you’ll see something like this:
<!-- ==start== dump {ts '2017-05-25 03:24:15'} format: html -->
<div id="x8e" class="-lucee-dump"><script language="JavaScript" type="text/javascript">var dumpData={};

Start copying the JSON data from just after the part that looks like dumpData['x8e']= and all the way down to the closing curly brace, right before ;</script>. You should then be able to copy and paste into an editor like Sublime Text and run a “Pretty JSON” format, which will give you some more readable output;

Of course this is nowhere near as readable as the output would be in the browser, but it might let you get some useful into to deal with the errors you have.

I’m not sure of the plans to deal with HTML output, maybe an old style HTML table output could make a return?

For a longer term solution to emailing yourself a cfdump of error output, I can highly recommend using a service like Raygun. It’s not cheap (it used to be cheaper), but it’s a very good product and there is a CFML API for it. It’ll give you much more visibility of your errors and allow you to better manage them over time.

1 Like

Try format=simple


The docs also mention “classic”;
classic - classic view with html/css/javascript

1 Like

Thanks everyone, that seems to have sorted it.

That really helped me when migrating a CF project to Lucee. Thank you @justincarter.

1 Like