The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CIAO::Lib::Param::Error - package error information for CIAO::Lib::Param

SYNOPSIS

  eval { 
    ... calls to CIAO::Lib::Param ...
  };
  if ( my $e = $@ )
  {
     .. manipulations of $e ..
  }

DESCRIPTION

Depending upon how an error is generated, the cxcparam library returns error information which contains multiple fields. The underlying library returns errors in two fashions:

  1. returning an integer error code

  2. generating a text message and bailing out

In the second case, the error should be considered fatal, as the library's data structures are left in an indeterminate state.

In order to simplify error interactions, the Perl interface always throws an exception via croak upon error. For simple applications, not catching the exception (by doing nothing) will cause the application to terminate.

For more fine-grained error handling, more information is required. To that end, CIAO::Lib::Param throws a CIAO::Lib::Param::Error object, which resolves to a printable string when used in the appropriate context. Otherwise, it can be used to obtain more information about the error.

Methods

error

This is the message printed when the object is used in a scalar context. It constructed either from errstr or from errmsg, if the latter is defined.

errno

This is a cxcparam standard error code. See the cxcparam source code for more information on what the error codes mean.

errstr

This is the standard description associated with the cxcparam errors.

errmsg

If the cxcparam library reported an error via the second path mentioned above, this will return the generated message, else it returns undef. This method can be used to determine if the application should attempt to recover from an error.

SEE ALSO

CIAO::Lib::Param

AUTHOR

Diab Jerius, <djerius@cpan>

COPYRIGHT AND LICENSE

Copyright (C) 2005 by the Smithsonian Astrophysical Observatory

This code is released under the GNU General Public License. You may find a copy at <http://www.fsf.org/copyleft/gpl.html>.