Source: bemap-model/bemap-error.js

/**
 * BeNomad BeMap JavaScript API - Error
 */

/**
 * @classdesc
 * Base class for bemap error.
 * @public
 * @constructor
 * @abstract
 * @param {object} options see below the available values.
 * @param {String} options.code the error code.
 * @param {Int} options.message the error message.
 */
bemap.Error = function(options) {
    var opts = options || {};

    /**
     * @type {String}
     * @protected
     */
    this.code = opts.code ? opts.code : null;

    /**
     * @type {String}
     * @protected
     */
    this.message = opts.message ? opts.message : null;
};

/**
 * Get the code of the error.
 * @return {String} code
 */
bemap.Error.prototype.getCode = function() {
    return this.code;
};

/**
 * Get the message of the error.
 * @return {String} message
 */
bemap.Error.prototype.getMessage = function() {
    return this.message;
};