View Full Version : How can i catch server response w/ Warning,Notice,Parse error by Ext.data.proxy.Ajax

14 Sep 2011, 4:16 AM
Hello, i have DataView with Ext.data.Store

Ext.create('Ext.data.Store', {
id: 'DataStore',
autoLoad: true,
fields: [{
name: 'proj_id',
type: 'int'
}, {
name: 'name',
type: 'string'
proxy: {
type: 'ajax',
actionMethods: {
create: 'POST',
destroy: 'DELETE',
read: 'POST',
update: 'POST'
extraParams: {
f: 'get-projects',
h: h
url: 'projects.php',
reader: {
type: 'json',
root: 'projects',
totalProperty: 'count',
invites: 'invites'
listeners: {
scope: this,
exception: function (s, r) {
console.log('proxy error');
listeners: {
scope: this,
beforeload: function () {
console.log('store beforeload');
load: function (s, r, o) {
console.log('store loaded data');

Store do request and server response something like this

<br /> <b>Parse error</b>: syntax error, unexpected T_ARRAY in <b>projects.php</b> on line <b>11</b><br />

or Parse error, or Notice or other text not json object.
I did this bad response special to check exception event in proxy.ajax but it is not working.

How can i check that server response have error in response format or why exception event in proxy do not catch this error?