File: Ext.Error.html

package info (click to toggle)
libjs-extjs 3.4.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 53,188 kB
  • ctags: 3,384
  • sloc: php: 819; xml: 537; python: 60; sql: 44; makefile: 35
file content (25 lines) | stat: -rw-r--r-- 4,635 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<div xmlns:ext="http://www.extjs.com" class="body-wrap"><h1>Class <a href="source/Error.html#cls-Ext.Error">Ext.Error</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/Error.html#cls-Ext.Error">Error.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/Error.html#cls-Ext.Error">Error</a></td></tr><tr><td class="label">Subclasses:</td><td class="hd-info"><a href="output/Ext.data.Api.Error.html" ext:cls="Ext.data.Api.Error">Api.Error</a>,&#13;<a href="output/Ext.data.DataProxy.Error.html" ext:cls="Ext.data.DataProxy.Error">DataProxy.Error</a>,&#13;<a href="output/Ext.data.DataReader.Error.html" ext:cls="Ext.data.DataReader.Error">DataReader.Error</a>,&#13;<a href="output/Ext.data.Store.Error.html" ext:cls="Ext.data.Store.Error">Store.Error</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr></table><div class="description"><p>A base error class. Future implementations are intended to provide more
robust error handling throughout the framework (<b>in the debug build only</b>)
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.</p>
<p>Some sample messages currently implemented:</p><pre>
"DataProxy attempted to execute an API-action but found an undefined
url / function. Please review your Proxy url/api-configuration."
</pre><pre>
"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."
</pre>
<p>An example of the code used for generating error messages:</p><pre><code>try {
    generateError({
        foo: <em>'bar'</em>
    });
}
catch (e) {
    console.error(e);
}
<b>function</b> generateError(data) {
    throw <b>new</b> Ext.Error(<em>'foo-error'</em>, data);
}</code></pre></div><div class="hr"></div><a id="Ext.Error-props"></a><h2>Public Properties</h2><div class="no-members">This class has no public properties.</div><a id="Ext.Error-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Error-getMessage"></a><b class="method"><a href="source/Error.html#method-Ext.Error-getMessage">getMessage</a></b><span class="openparen">(</span><span class="closeparen">)</span><span class="colon">&nbsp;:&nbsp;</span><span class="return">String</span><div class="mdesc"><div class="short">getMessage</div><div class="long">getMessage<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>String</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">Error</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Error-getName"></a><b class="method"><a href="source/Error.html#method-Ext.Error-getName">getName</a></b><span class="openparen">(</span><span class="closeparen">)</span><span class="colon">&nbsp;:&nbsp;</span><span class="return">String</span><div class="mdesc"><div class="short">getName</div><div class="long">getName<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>String</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">Error</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.Error-toJson"></a><b class="method"><a href="source/Error.html#method-Ext.Error-toJson">toJson</a></b><span class="openparen">(</span><span class="closeparen">)</span><span class="colon">&nbsp;:&nbsp;</span><span class="return">String</span><div class="mdesc"><div class="short">toJson</div><div class="long">toJson<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>String</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">Error</td></tr></tbody></table><a id="Ext.Error-events"></a><h2>Public Events</h2><div class="no-members">This class has no public events.</div></div>