@stringsync/vexml
Version:
MusicXML to Vexflow
30 lines (29 loc) • 888 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ParseError = exports.DocumentError = exports.VexmlError = void 0;
/** A generic vexml error. */
class VexmlError extends Error {
code;
constructor(message, code = 'GENERIC_ERROR') {
super(message);
this.name = 'VexmlError';
this.code = code;
}
}
exports.VexmlError = VexmlError;
/** An error thrown when attempting to mutate the document. */
class DocumentError extends VexmlError {
constructor(message) {
super(message, 'DOCUMENT_ERROR');
this.name = 'DocumentError';
}
}
exports.DocumentError = DocumentError;
/** An error thrown during the parsing process. */
class ParseError extends VexmlError {
constructor(message) {
super(message, 'PARSE_ERROR');
this.name = 'ParseError';
}
}
exports.ParseError = ParseError;