Ok, so the onError docs say this: Use the onError event in Application.cfc to handle exception errors that are not handled by try/catch code on the application pages.

That being said, the ModelGlue exception handler should catch all errors if the following is true:

<cfif isObject(getCurrentEventHandler()) and getCurrentEventHandler().name neq exceptionEventHandler and variables._modelGlue.hasEventHandler(exceptionEventHandler)>

This means, the framework will use the exception handler, if:
The framework could find the currentEventHandler and make an event handler object out of it AND the current event is not the ExcetionHandler (Otherwise we'd have an endless loop of error handling)
AND the framework has an exceptionHandler defined in it.


So if all those things are true in your application, (and your error handler does not have an error) control should remain in the framework and not bubble up to the Application.OnError() method.

That's how it is supposed to work. Can you confirm this is the case in your application? Specifically,
-Do you have an Exception Event defined?
-Does the code in your Exception Event run without any programming errors?


DW




Rawlins wrote:

HI Dan. ModelGllue.cfc says 3.2.439 if that helps.

Thanks,

Rob

On Wednesday, January 16, 2013 11:57:43 AM UTC, Dan Wilson -
[email protected] wrote:

What version of Model Glue are you using?

On Jan 16, 2013 6:30 AM, "Rawlins" <[email protected]
<javascript:>> wrote:

Hello Guys,

I'm implementing a new error logger within an MG app I'm
running. The existing logger call I have is done inside the
exception controller before rendering the appropriate view
based on environment.

One of my major issues has always been that this meant my
logger was only tracking exceptions which occur within the
framework, and not at a truely application wide level.

My aim is to move the logger calls into app.cfc onError() so
it traps all app exceptions thrown, even those uncaught by MG.

However, it seems that using onError() then breaks the MG
event handlers for errors.

Anyone got an recommendations on how I might be able to handle
this so I can still display the MG error events?

Thanks,

Rob

--
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]
<javascript:>
To unsubscribe from this group, send email to
[email protected] <javascript:>
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en
<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

--
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