UNPKG

bluecodex

Version:

Turn repetitive dev tasks into CLI commands with Typescript

18 lines (15 loc) 409 B
import type { DataTypeCastError } from "../../data-type/errors/data-type-cast-error"; export class ArgFallbackCastError< ArgName extends string = string, Err extends DataTypeCastError = DataTypeCastError, > extends Error { constructor( readonly argName: ArgName, readonly error: Err, ) { super(); } get message() { return `In arg "${this.argName}": ${this.error.message}`; } }