UNPKG

@adonisjs/ace

Version:

Commandline apps framework used by AdonisJs

59 lines (58 loc) 1.66 kB
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; }