semanticError.js 308 B

12345678910111213141516
  1. export class SemanticError extends Error {
  2. constructor (msg, id) {
  3. super(...msg);
  4. this.id = id;
  5. if (Error.captureStackTrace) Error.captureStackTrace(this, SemanticError);
  6. }
  7. get context () {
  8. return this._context;
  9. }
  10. set context (contextObj) {
  11. this._context = contextObj;
  12. }
  13. }