Hi Ryan,

You are correct that at the present time the built-in onRequestEnd
event-handler/message broadcast will not be executed when an exception
occurs. This happens because the exception handling breaks out of the
normal event lifecycle, and therefore the onRequestEnd event is never
queued.

Please raise a ticket for this, and we'll see if it is feasible to
change this behavior without breaking the exception handling:

http://docs.model-glue.com/newticket

That said, it certainly appears to me that adding an onRequestEnd
message broadcast in the exception event-handler will indeed fire a
matching message-listener function. This will not work in quite the
same manner as a built-in broadcast, as the function will not be
invoked at the end of the request (for example, the exception view
will be rendered after the function executes). At the moment, when an
exception occurs there would be no way to defer the execution of such
a function until after view rendering takes place (as would normally
be the case with the built-in onRequestEnd event-handler).

--
Ezra Parker


On Sat, Feb 27, 2010 at 10:38 PM, Ryan Stille <[email protected]> wrote:
> I want do call a method at the end of a request, even when there is an
> error.  It appears that onRequestEnd isn't run when an exception
> happens?
>
> I tried modifying my exception event by adding a broadcast for
> onRequestEnd:
>
>                <event-handler name="exception">
>                        <broadcasts>
>                                <message name="onRequestEnd" />
>                        </broadcasts>
>                        <views>
>                                <include name="body" template="exception.cfm" 
> />
>                        </views>
>                </event-handler>
>
> But that still didn't cause onRequestEnd to be run.   Can it be done?
>
> -thanks
>
> --
> Model-Glue Sites:
> Home Page: http://www.model-glue.com
> Documentation: http://docs.model-glue.com
> Bug Tracker: http://bugs.model-glue.com
> Blog: http://www.model-glue.com/blog
>
> You received this message because you are subscribed to the Google
> Groups "model-glue" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/model-glue?hl=en
>

-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Reply via email to