Danny Warren > Solaris-ProcessContract-1.01 > Solaris::ProcessContract::Exceptions

Download:
Solaris-ProcessContract-1.01.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 1.01   Source  

NAME ^

Solaris::ProcessContract::Exceptions - Exceptions for Solaris::ProcessContract

SYNOPSIS ^

  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
  }

DESCRIPTION ^

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.

EXCEPTIONS ^

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.

Solaris::ProcessContract::Exception

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.

Solaris::ProcessContract::Exception::XS

An exception for anything that goes wrong when talking to libcontract(3).

Solaris::ProcessContract::Exception::Params

An exception for any time you try and pass the wrong parameters to a method.

SEE ALSO ^

Solaris::ProcessContract
Exception::Class

AUTHOR ^

Danny Warren

syntax highlighting: