help with ViewJsonStrategy Exception

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

help with ViewJsonStrategy Exception

Murilo
Hi guys, i need help. I changed the module.config to accept
ViewJsonStrategy.

But when one excepetion dispared return json object  without exception
message: {"content":{"message":"An error occurred during execution; please
try again later.","exception":{},"display_exceptions":true}}.

I need this message with exception message, ex: {"content":{"message":"An
error occurred during execution; please try again
later.","exception":"Connect Error: SQLSTATE[28000] [1045] Access denied
for user \u0027root\u0027@\u0027localhost\u0027 (using password:
YES)","display_exceptions":true}}

Any idea?




Thanks

   Murilo Elias
luk
Reply | Threaded
Open this post in threaded view
|

Re: help with ViewJsonStrategy Exception

luk
Murilo wrote
Hi guys, i need help. I changed the module.config to accept
ViewJsonStrategy.

But when one excepetion dispared return json object  without exception
message: {"content":{"message":"An error occurred during execution; please
try again later.","exception":{},"display_exceptions":true}}.

I need this message with exception message, ex: {"content":{"message":"An
error occurred during execution; please try again
later.","exception":"Connect Error: SQLSTATE[28000] [1045] Access denied
for user \u0027root\u0027@\u0027localhost\u0027 (using password:
YES)","display_exceptions":true}}
You would need to catch that Exception by listening on dispacth.error event and set returned message from Exception object into one of your JsonModel variables.
Cheers, -- Luke Mierzwa