UNPKG

music21j-port

Version:

A toolkit for computer-aided musicology, Javascript version

19 lines (15 loc) 516 B
// not working properly... class ExtendableError extends Error { constructor(message) { super(message); this.name = this.constructor.name; this.message = message; if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, this.constructor); } else { this.stack = new Error(message).stack; } } } export class Music21Exception extends ExtendableError {} export class StreamException extends Music21Exception {}