Sha256: ff4b6b27ec7b22f7a501cfa241cc4944d2702a8ecb7a84dcf079c1c8f638e427

Contents?: true

Size: 998 Bytes

Versions: 2

Compression:

Stored size: 998 Bytes

Contents

/**
 @module @ember/error
*/
function ExtendBuiltin(klass) {
    function ExtendableBuiltin() {
        klass.apply(this, arguments);
    }
    ExtendableBuiltin.prototype = Object.create(klass.prototype);
    ExtendableBuiltin.prototype.constructor = ExtendableBuiltin;
    return ExtendableBuiltin;
}
/**
  A subclass of the JavaScript Error object for use in Ember.

  @class EmberError
  @extends Error
  @constructor
  @public
*/
export default class EmberError extends ExtendBuiltin(Error) {
    constructor(message) {
        super();
        if (!(this instanceof EmberError)) {
            return new EmberError(message);
        }
        let error = Error.call(this, message);
        this.stack = error.stack;
        this.description = error.description;
        this.fileName = error.fileName;
        this.lineNumber = error.lineNumber;
        this.message = error.message;
        this.name = error.name;
        this.number = error.number;
        this.code = error.code;
    }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
discourse-ember-source-3.5.1.1 dist/es/@ember/error/index.js
discourse-ember-source-3.5.1.0 dist/dist/es/@ember/error/index.js