ohif-viewer/Packages/ohif-core/client/classes/OHIFError.js

14 lines
334 B
JavaScript

// @TODO: improve this object
/**
* Objects to be used to throw errors, specially
* in Trackers functions (afterFlush, Flush).
*/
export class OHIFError extends Error {
constructor(message) {
super();
this.message = message;
this.stack = (new Error()).stack;
this.name = this.constructor.name;
}
}