UNPKG

@dbml/cli

Version:

See our website [@dbml/cli](https://dbml.dbdiagram.io/cli/) for more information

24 lines (23 loc) 825 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _lodash = _interopRequireDefault(require("lodash")); var _domainError = _interopRequireDefault(require("./domainError")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } class SyntaxError extends _domainError.default { constructor(fileName, rootError = {}) { let message = `You have a syntax error at "${fileName}"`; if (rootError.location) { message += ` line ${rootError.location.start.line} column ${rootError.location.start.column}`; } message += '.'; if (!_lodash.default.isEmpty(rootError)) { message += ` ${rootError.message}`; } super(message, rootError); } } var _default = SyntaxError; exports.default = _default;