NAME
CIAO/Lib/Param/Error.pm
VERSION
version 0.09
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:
returning an integer error code
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 fromerrmsg
, 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.
INTERNALS
NAME
CIAO::Lib::Param::Error - package error information for CIAO::Lib::Param
SUPPORT
Bugs
Please report any bugs or feature requests to bug-ciao-lib-param@rt.cpan.org or through the web interface at: https://rt.cpan.org/Public/Dist/Display.html?Name=CIAO-Lib-Param
Source
Source is available at
https://gitlab.com/djerius/ciao-lib-param
and may be cloned from
https://gitlab.com/djerius/ciao-lib-param.git
SEE ALSO
Please see those modules/websites for more information related to this module.
AUTHOR
Diab Jerius <djerius@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2005 by Smithsonian Astrophysical Observatory.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007