Properties Methods Events Direct Link

# Class Ext.Error

Package: | Ext
Defined In: | Error.js
Class: | Error
Subclasses: | Api.Error, DataProxy.Error, DataReader.Error, Store.Error
Extends: | Object

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);
    }

## Public Properties

This class has no public properties.

## Public Methods

Method | Defined By
--- | ---
| getMessage() : String getMessage getMessage Parameters: None. Returns: `String` | Error
| getName() : String getName getName Parameters: None. Returns: `String` | Error
| toJson() : String toJson toJson Parameters: None. Returns: `String` | Error

## Public Events

This class has no public events.