13 lines
359 B
TypeScript
13 lines
359 B
TypeScript
|
/**
|
||
|
* An error to be thrown when a configuration value is invalid.
|
||
|
*/
|
||
|
export class ConfigError extends Error {
|
||
|
constructor(
|
||
|
public readonly key: string,
|
||
|
public readonly supplied_value: any,
|
||
|
message?: string
|
||
|
) {
|
||
|
super(message || `The value of the config key "${key}" is invalid. (${supplied_value} provided)`)
|
||
|
}
|
||
|
}
|