Home Reference Source Repository

js/models/error.js

/**
 * Base extendable class for errors
 */
export default class BaseError extends Error {
    constructor(message) {
        super();
        this.message = message;
        this.stack = (new Error()).stack;
        this.name = this.constructor.name;
    }
}