@stringsync/vexml
Version:
MusicXML to Vexflow
24 lines (23 loc) • 653 B
JavaScript
/** A generic vexml error. */
export class VexmlError extends Error {
code;
constructor(message, code = 'GENERIC_ERROR') {
super(message);
this.name = 'VexmlError';
this.code = code;
}
}
/** An error thrown when attempting to mutate the document. */
export class DocumentError extends VexmlError {
constructor(message) {
super(message, 'DOCUMENT_ERROR');
this.name = 'DocumentError';
}
}
/** An error thrown during the parsing process. */
export class ParseError extends VexmlError {
constructor(message) {
super(message, 'PARSE_ERROR');
this.name = 'ParseError';
}
}