cfw 2.02 /events/onabort.cfm example?

25 прегледи
Прескокни до првата непрочитана порака

dhga...@gmail.com

непрочитано,
8.3.2021, во 15:45:448.3.21
до CFWheels
Does anyone have a working version of  /events/onabort.cfm that displays an error to the user that they can post?

I tried the following code BUT I get a " ERROR:Element PARAMS.CONTROLLER is undefined in VARIABLES"

<cfscript>// FILENAME: /events/onabort.cfm
// Place code here that should be executed on the "onAbort" event.
renderView( template = "/home/onerror.cfm",  layout=false, cache=0);  
</cfscript>


and my /home/onerror.cfm is;

<!--- FILENAME: /views/home/onerror.cfm --->
<!--- Place HTML here that should be displayed when an error is encountered while running in "production" mode. --->
<div>
<h1>Error!</h1>
<p>
    Sorry, that caused an unexpected error.<br>
        Please try again later.
</p>
<cfdump var="#variables#" label="** VARIABLES **">
</div>

During development, I use <cfabort showError = "error message"> alot to  debug/understand the flow of my controllers.
Одговор до сите
Одговорете му на авторот
Проследи
0 нови пораки