Sha256: ddee7c2c1fa690c771466b256911d4f86424141c3242f89d22c98a910fe43d3b
Contents?: true
Size: 827 Bytes
Versions: 6
Compression:
Stored size: 827 Bytes
Contents
export default class CliArgumentError extends Error { static MESSAGES = { cwdRequired: 'Current working directory is required as first argument.', entrypointRequired: 'An entry point is required as second argument.', builderRequired: 'The builder is required as third and final argument.', cwdUnknown: ({ cwd }) => `A valid working directory is required - received ${cwd}`, entrypointUnknown: ({ entrypoint }) => `A valid entrypoint is required - received ${entrypoint}`, builderUnknown: ({ builder }) => `Unknown builder '${builder}'` } constructor(reason, options) { let message = CliArgumentError.MESSAGES[reason] if (typeof message === 'function') { message = message(options) } super(message, options) this.reason = reason this.message = message } }
Version data entries
6 entries across 6 versions & 1 rubygems