PDA

View Full Version : Ext.data.reader.Json exceptions



le_chef
29 Mar 2012, 2:04 PM
Hello,

a JSON reader apparently can throw a couple of exceptions not documented, taken from source code:

1)
msg:'Unable to parse the JSON returned by the server: '+ ex.toString()
2)[FONT=monospace]
Ext.Error.raise('JSON object not found');

Two questions:

1- have these two exceptions intentionally been left undocumented and in case, why? Generally speaking, I prefer to catch all exceptions but, being new to ExtJS, there could be some reasons I'm not aware of to not catch these two ones;

2- AFAIK there are no config params for event handling in a JSON reader, so I'd like to know how/where can I attach a listener for these exceptions? Using some Observable ?

Thank you in advance, bye

C.

mitchellsimoens
30 Mar 2012, 8:53 AM
4.1.0 RC1's getResponseData is different and fires an exception event on itself which should be listenable from the store.