Default exception responses

46 views
Skip to first unread message

Geri Stoqnowa

unread,
May 29, 2012, 3:18:14 PM5/29/12
to allo...@googlegroups.com
Hello,

Is it possible to override the default exception responses? For example, a missing action returns something similar to:

{"results":{"exception":{"code":0,"message":"Module 'MyModule' does not have a callable method 'MyAction'"}}}

 I can easily hack into the Alloy code and change it, however, such a solution sounds bit lame :)

Thanks in advance,
Geri

Vance Lucas

unread,
May 29, 2012, 3:37:29 PM5/29/12
to allo...@googlegroups.com
Geri -

The functionality to handle exceptions is built-in here:

All you have to do to handle the exception yourself is hook into "dispatch_exception" event and handle it with your own callback or closure.

Here's an example of how to do this in a Plugin:

Cheers,
Vance Lucas
Reply all
Reply to author
Forward
0 new messages