Created
July 9, 2013 08:01
-
-
Save MihailoJoksimovic/5955540 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.getWebuserDetailsStore().sync({ | |
failure: function(batch, options) { | |
var errorCode = this.getReader().jsonData.error_code; | |
switch(errorCode) { | |
case 11: // Duplicate email | |
var errorMessage = Translation.EmailAlreadyExistsPleaseUseAnother; | |
break; | |
default: | |
var errorMessage = Translation.AnErrorHasOccured; | |
break; | |
} | |
Ext.defer(function() { | |
Ext.Msg.alert(Translation.Warning, errorMessage); | |
}, 50); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment