X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/docs/source/Error.html diff --git a/docs/source/Error.html b/docs/source/Error.html deleted file mode 100644 index 65a4b75a..00000000 --- a/docs/source/Error.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - The source code - - - - -
/*!
- * Ext JS Library 3.3.1
- * Copyright(c) 2006-2010 Sencha Inc.
- * licensing@sencha.com
- * http://www.sencha.com/license
- */
-
/** - * Framework-wide error-handler. Developers can override this method to provide - * custom exception-handling. Framework errors will often extend from the base - * Ext.Error class. - * @param {Object/Error} e The thrown exception object. - */ -Ext.handleError = function(e) { - throw e; -}; - -
/** - * @class Ext.Error - * @extends Error - *

A base error class. Future implementations are intended to provide more - * robust error handling throughout the framework (in the debug build only) - * to check for common errors and problems. The messages issued by this class - * will aid error checking. Error checks will be automatically removed in the - * production build so that performance is not negatively impacted.

- *

Some sample messages currently implemented:

-"DataProxy attempted to execute an API-action but found an undefined
-url / function. Please review your Proxy url/api-configuration."
- * 
-"Could not locate your "root" property in your server response.
-Please review your JsonReader config to ensure the config-property
-"root" matches the property your server-response.  See the JsonReader
-docs for additional assistance."
- * 
- *

An example of the code used for generating error messages:


-try {
-    generateError({
-        foo: 'bar'
-    });
-}
-catch (e) {
-    console.error(e);
-}
-function generateError(data) {
-    throw new Ext.Error('foo-error', data);
-}
- * 
- * @param {String} message - */ -Ext.Error = function(message) { - // Try to read the message from Ext.Error.lang - this.message = (this.lang[message]) ? this.lang[message] : message; -}; - -Ext.Error.prototype = new Error(); -Ext.apply(Ext.Error.prototype, { - // protected. Extensions place their error-strings here. - lang: {}, - - name: 'Ext.Error', -
/** - * getName - * @return {String} - */ - getName : function() { - return this.name; - }, -
/** - * getMessage - * @return {String} - */ - getMessage : function() { - return this.message; - }, -
/** - * toJson - * @return {String} - */ - toJson : function() { - return Ext.encode(this); - } -}); -
- - \ No newline at end of file