It would seem that I have solved my own issue :)
I am able to use the following code in /events/onerror.cfm and /events/
onmissingtemplate.cfm to basically re-run the request with new
pathinfo.
<cfscript>
request.cgi.path_info = "/exceptions/internalservererror";
StructDelete(url, "action");
StructDelete(url, "controller");
StructDelete(url, "route");
WriteOutput(application.wheels.dispatch.$request());
</cfscript>
I just changed out the path_info for each event. This seems like a
good solution as you could test for different types of errors in
onerror and return the proper exception action. This method has the
additional benefit that if an error occurs within onerror(),
Coldfusion catches it and shows the standard coldfusion error display
(no recusive error trapping). Also, the status headers wheels set (404
for onmissingtemplate and 500 for onerror) still show up for the
request.
Maybe I should make this a plugin.
James
On Oct 28, 8:16 am, "
m...@iamjamesgibson.com"