3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
\r
4 <title>The source code</title>
\r
5 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
\r
6 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
\r
8 <body onload="prettyPrint();">
\r
9 <pre class="prettyprint lang-js"><div id="method-Ext.EventManager-handleError"></div>/**
10 * Framework-wide error-handler. Developers can override this method to provide
11 * custom exception-handling. Framework errors will often extend from the base
13 * @param {Object/Error} e The thrown exception object.
15 Ext.handleError = function(e) {
19 <div id="cls-Ext.Error"></div>/**
22 * <p>A base error class. Future implementations are intended to provide more
23 * robust error handling throughout the framework (<b>in the debug build only</b>)
24 * to check for common errors and problems. The messages issued by this class
25 * will aid error checking. Error checks will be automatically removed in the
26 * production build so that performance is not negatively impacted.</p>
27 * <p>Some sample messages currently implemented:</p><pre>
28 "DataProxy attempted to execute an API-action but found an undefined
29 url / function. Please review your Proxy url/api-configuration."
31 "Could not locate your "root" property in your server response.
32 Please review your JsonReader config to ensure the config-property
33 "root" matches the property your server-response. See the JsonReader
34 docs for additional assistance."
36 * <p>An example of the code used for generating error messages:</p><pre><code>
45 function generateError(data) {
46 throw new Ext.Error('foo-error', data);
49 * @param {String} message
51 Ext.Error = function(message) {
52 // Try to read the message from Ext.Error.lang
53 this.message = (this.lang[message]) ? this.lang[message] : message;
55 Ext.Error.prototype = new Error();
56 Ext.apply(Ext.Error.prototype, {
57 // protected. Extensions place their error-strings here.
61 <div id="method-Ext.Error-getName"></div>/**
65 getName : function() {
68 <div id="method-Ext.Error-getMessage"></div>/**
72 getMessage : function() {
75 <div id="method-Ext.Error-toJson"></div>/**
80 return Ext.encode(this);