Bienvenue sur PostGIS.fr

Bienvenue sur PostGIS.fr , le site de la communauté des utilisateurs francophones de PostGIS.

PostGIS ajoute le support d'objets géographique à la base de données PostgreSQL. En effet, PostGIS "spatialise" le serverur PostgreSQL, ce qui permet de l'utiliser comme une base de données SIG.

Maintenu à jour, en fonction de nos disponibilités et des diverses sorties des outils que nous testons, nous vous proposons l'ensemble de nos travaux publiés en langue française.

source: trunk/workshop-routing-foss4g/web/ext/src/core/Error.js @ 76

Revision 76, 2.2 KB checked in by djay, 12 years ago (diff)

Ajout du répertoire web

  • Property svn:executable set to *
Line 
1/*!
2 * Ext JS Library 3.4.0
3 * Copyright(c) 2006-2011 Sencha Inc.
4 * licensing@sencha.com
5 * http://www.sencha.com/license
6 */
7/**
8 * Framework-wide error-handler.  Developers can override this method to provide
9 * custom exception-handling.  Framework errors will often extend from the base
10 * Ext.Error class.
11 * @param {Object/Error} e The thrown exception object.
12 */
13Ext.handleError = function(e) {
14    throw e;
15};
16
17/**
18 * @class Ext.Error
19 * @extends Error
20 * <p>A base error class. Future implementations are intended to provide more
21 * robust error handling throughout the framework (<b>in the debug build only</b>)
22 * to check for common errors and problems. The messages issued by this class
23 * will aid error checking. Error checks will be automatically removed in the
24 * production build so that performance is not negatively impacted.</p>
25 * <p>Some sample messages currently implemented:</p><pre>
26"DataProxy attempted to execute an API-action but found an undefined
27url / function. Please review your Proxy url/api-configuration."
28 * </pre><pre>
29"Could not locate your "root" property in your server response.
30Please review your JsonReader config to ensure the config-property
31"root" matches the property your server-response.  See the JsonReader
32docs for additional assistance."
33 * </pre>
34 * <p>An example of the code used for generating error messages:</p><pre><code>
35try {
36    generateError({
37        foo: 'bar'
38    });
39}
40catch (e) {
41    console.error(e);
42}
43function generateError(data) {
44    throw new Ext.Error('foo-error', data);
45}
46 * </code></pre>
47 * @param {String} message
48 */
49Ext.Error = function(message) {
50    // Try to read the message from Ext.Error.lang
51    this.message = (this.lang[message]) ? this.lang[message] : message;
52};
53
54Ext.Error.prototype = new Error();
55Ext.apply(Ext.Error.prototype, {
56    // protected.  Extensions place their error-strings here.
57    lang: {},
58
59    name: 'Ext.Error',
60    /**
61     * getName
62     * @return {String}
63     */
64    getName : function() {
65        return this.name;
66    },
67    /**
68     * getMessage
69     * @return {String}
70     */
71    getMessage : function() {
72        return this.message;
73    },
74    /**
75     * toJson
76     * @return {String}
77     */
78    toJson : function() {
79        return Ext.encode(this);
80    }
81});
Note: See TracBrowser for help on using the repository browser.