UNPKG

@dbml/cli

Version:

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

22 lines (16 loc) 518 B
import _ from 'lodash'; import DomainError from './domainError'; class SyntaxError extends DomainError { 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 (!_.isEmpty(rootError)) { message += ` ${rootError.message}`; } super(message, rootError); } } export default SyntaxError;