Solaris::ProcessContract::Exceptions - Exceptions for Solaris::ProcessContract
use Solaris::ProcessContract; my $pc = Solaris::ProcessContract->new(); eval { my $template = $pc->get_template(); $template->activate(); }; if ( my $ex = Solaris::ProcessContract::Exception->caught() ) { # Handle error }
This module uses Exception::Class for error handling.
You don't need to worry about exception handling if you don't want to. Your code will just die with appropriate error if an exception happens and you don't do anything to catch it.
The following types of exceptions are available. All of can be caught with "Solaris::ProcessContract::Exception", so you only need to worry about specific types if you want to do specific error handling.
A generic exception for anything that goes in Solaris::ProcessContract.
All of our other exceptions are of this type, so doing:
if ( my $ex = Solaris::ProcessContract::Exception->caught() )
will catch the others, too.
An exception for anything that goes wrong when talking to libcontract(3).
An exception for any time you try and pass the wrong parameters to a method.
Danny Warren
To install Solaris::ProcessContract, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Solaris::ProcessContract
CPAN shell
perl -MCPAN -e shell install Solaris::ProcessContract
For more information on module installation, please visit the detailed CPAN module installation guide.