| CLI-Framework documentation | Contained in the CLI-Framework distribution. |
CLI::Framework::Exceptions - Exceptions used by CLIF
This package defines the following exception types. These exception objects are created using Exception::Class and are subtypes of Exception::Class::Base.
General CLIF error
throw_clif_exception
Application hook method failed preconditions
throw_app_hook_exception
Failed parsing of application options
throw_app_opts_parse_exception
Failed validation of application options
throw_app_opts_validation_exception
Failed application initialization
throw_app_init_exception
Invalid command
throw_invalid_cmd_exception
Failed command registration
throw_cmd_registration_exception
Object is not of the proper type
throw_type_exception
Failed parsing of command options
throw_cmd_opts_parse_exception
Failed validation of command options/arguments
throw_cmd_validation_exception
Failure to run command
throw_cmd_run_exception
All aliases are available for use by client code (but none are exported by
default). The ':all' tag causes all of the aliases to be exported.
| CLI-Framework documentation | Contained in the CLI-Framework distribution. |
package CLI::Framework::Exceptions; use strict; use warnings; our $VERSION = 0.02; # Make it possible to use aliases directly in client code... use Exporter qw( import ); our @EXPORT_OK = qw( throw_clif_exception throw_app_hook_exception throw_app_opts_parse_exception throw_app_opts_validation_exception throw_app_init_exception throw_invalid_cmd_exception throw_cmd_registration_exception throw_type_exception throw_cmd_opts_parse_exception throw_cmd_validation_exception throw_cmd_run_exception ); our %EXPORT_TAGS = ( all => \@EXPORT_OK ); # Create exception class hierarchy... use Exception::Class ( 'CLI::Framework::Exception' => { description => 'General CLIF error', alias => 'throw_clif_exception', }, 'CLI::Framework::Exception::AppHookException' => { isa => 'CLI::Framework::Exception', description => 'Application hook method failed preconditions', alias => 'throw_app_hook_exception', }, 'CLI::Framework::Exception::AppOptsParsingException' => { isa => 'CLI::Framework::Exception', description => 'Failed parsing of application options', alias => 'throw_app_opts_parse_exception' }, 'CLI::Framework::Exception::AppOptsValidationException' => { isa => 'CLI::Framework::Exception', description => 'Failed validation of application options', alias => 'throw_app_opts_validation_exception' }, 'CLI::Framework::Exception::AppInitException' => { isa => 'CLI::Framework::Exception', description => 'Failed application initialization', alias => 'throw_app_init_exception' }, 'CLI::Framework::Exception::InvalidCmdException' => { isa => 'CLI::Framework::Exception', description => 'Invalid command', alias => 'throw_invalid_cmd_exception' }, 'CLI::Framework::Exception::CmdRegistrationException' => { isa => 'CLI::Framework::Exception', description => 'Failed command registration', alias => 'throw_cmd_registration_exception', }, 'CLI::Framework::Exception::TypeException' => { isa => 'CLI::Framework::Exception', description => 'Object is not of the proper type', alias => 'throw_type_exception', }, 'CLI::Framework::Exception::CmdOptsParsingException' => { isa => 'CLI::Framework::Exception', description => 'Failed parsing of command options', alias => 'throw_cmd_opts_parse_exception' }, 'CLI::Framework::Exception::CmdValidationException' => { isa => 'CLI::Framework::Exception', description => 'Failed validation of command options/arguments', alias => 'throw_cmd_validation_exception' }, 'CLI::Framework::Exception::CmdRunException' => { isa => 'CLI::Framework::Exception', description => 'Failure to run command', alias => 'throw_cmd_run_exception' }, ); #------- 1; __END__