File size: 1,008 Bytes
4e23b01 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | /**
* Base error class for the kaos package.
*/
export class KaosError extends Error {
constructor(message: string) {
super(message);
this.name = 'KaosError';
}
}
/**
* Equivalent to Python's ValueError — indicates an invalid argument was passed.
*/
export class KaosValueError extends KaosError {
constructor(message: string) {
super(message);
this.name = 'KaosValueError';
}
}
/**
* Equivalent to Python's FileExistsError — indicates a file or directory already exists.
*/
export class KaosFileExistsError extends KaosError {
constructor(message: string) {
super(message);
this.name = 'KaosFileExistsError';
}
}
/**
* Thrown by `detectEnvironment` on Windows when no Git Bash install can be
* located. Carries the list of paths that were probed so callers can include
* them in install hints.
*/
export class KaosShellNotFoundError extends KaosError {
constructor(message: string) {
super(message);
this.name = 'KaosShellNotFoundError';
}
}
|