Ignoring onError Function in Certain Environments
Hi all,
So we use the onError function in Application.cfc to show users a generic message if they happen to encounter an error. In our development environments, we generally comment out the onError function which results in errors producing a very nice helpful stack trace.
This has proved problematic in the event of changing the Application.cfc and forgetting that you did that, resulting in an unwanted change to prod. Ideally it should be caught but that's not the point. And it'd be nice if nobody had to worry about it.
I'd like to know if there's any way to show that nice stack trace screen if we are in a development environment. Assuming I know that we are in a dev environment, I've tried wrapping the entire onError function in a <cfif> but it doesn't seem to care about that. Is there a template somewhere that I can invoke that presumably takes the Exception variable and puts it in the nice stack trace format? Dumping the Exception variable is alright but not nearly as legible.
Thanks!
