function TimeoutError(message){
    this.name = this.constructor.name;
    this.message = message;

    // This will print TimeoutError in the stack, and not Error.
    if (typeof Error.captureStackTrace === "function") {
        Error.captureStackTrace(this, this.constructor);

    } else { 
        this.stack = (new Error(message)).stack; 
    }
}

TimeoutError.prototype = Object.create(Error.prototype);
TimeoutError.prototype.constructor = TimeoutError;

export default TimeoutError;
