RE: [coldbox:9434] Errors in ColdBox and trapping revisited with AoP mixed in for a smoother experience

There is. It’s called “onInvalidEvent”, and it receives the invalid event string, ehBean, and an override flag. If you set the override flag to true (and presumably override the handler, method, and invocation path in the ehBean) then that event will be run instead.

Also, if you have a onInvalidEvent handler defined, that handler will automatically be called instead (after the interception broadcast). You can get get the invalid event out of the private request collection and make a decision about what you want to do there.

Both of those methods will prevent the “throwit” from executing at the button of the invalidEvent method of the handlerService, which will allow you to gracefully recover, or rethrow an error if you choose.

Thanks!

~Brad

Brad, I used the invalidEvent function as an example. I was looking for one stop for all, and I found that with the onExcpetion.

Regards,

Andrew Scott

http://www.andyscott.id.au/