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