mirror of
https://github.com/arthur-pbty/portfolio2023.git
synced 2026-08-07 04:31:12 +02:00
59 lines
1.6 KiB
TypeScript
59 lines
1.6 KiB
TypeScript
import { Exception } from '@poppinss/utils';
|
|
import { CommandConstructorContract } from '../Contracts';
|
|
/**
|
|
* Raised when a required argument is missing
|
|
*/
|
|
export declare class MissingArgumentException extends Exception {
|
|
command: CommandConstructorContract;
|
|
argumentName: string;
|
|
/**
|
|
* A required argument is missing
|
|
*/
|
|
static invoke(name: string, command: CommandConstructorContract): MissingArgumentException;
|
|
/**
|
|
* Handle itself
|
|
*/
|
|
handle(error: MissingArgumentException): void;
|
|
}
|
|
/**
|
|
* Raised when an the type of a flag is not as one of the excepted type
|
|
*/
|
|
export declare class InvalidFlagException extends Exception {
|
|
command?: CommandConstructorContract;
|
|
flagName: string;
|
|
expectedType: string;
|
|
/**
|
|
* Flag type validation failed.
|
|
*/
|
|
static invoke(prop: string, expected: string, command?: CommandConstructorContract): InvalidFlagException;
|
|
/**
|
|
* Handle itself
|
|
*/
|
|
handle(error: InvalidFlagException): void;
|
|
}
|
|
/**
|
|
* Raised when command is not registered with kernel
|
|
*/
|
|
export declare class InvalidCommandException extends Exception {
|
|
commandName: string;
|
|
suggestions: string[];
|
|
static invoke(commandName: string, suggestions: string[]): InvalidCommandException;
|
|
/**
|
|
* Handle itself
|
|
*/
|
|
handle(error: InvalidCommandException): void;
|
|
}
|
|
/**
|
|
* Raised when an unknown flag is defined
|
|
*/
|
|
export declare class UnknownFlagException extends Exception {
|
|
/**
|
|
* Unknown flag
|
|
*/
|
|
static invoke(prop: string): UnknownFlagException;
|
|
/**
|
|
* Handle itself
|
|
*/
|
|
handle(error: UnknownFlagException): void;
|
|
}
|