Skip to content

Instantly share code, notes, and snippets.

@fabiobruna
Created August 19, 2014 20:21
Show Gist options
  • Save fabiobruna/d342bc71837166c35c6d to your computer and use it in GitHub Desktop.
Save fabiobruna/d342bc71837166c35c6d to your computer and use it in GitHub Desktop.
Extjs error handeling, uitzoeken.
store.load({
params: {
'param1':waardel,
'param2': waarde2
},
callback:function(records, operation, success){
msg.hide();
if(success === true){
if(records.length === 0){
Ext.Msg.alert('Resultaat', 'Nix');
}
}
if(success === false){
try{
Ext.Msg.alert('Error', operation.getError()); // way more elegant than ussing rawData etc ...
}catch(e){
Ext.Msg.alert('Error', 'Error iets op de servert.');
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment