Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
OpenXPKI::Exception(3)User Contributed Perl DocumentatioOpenXPKI::Exception(3)

Name
       OpenXPKI::Exception - central exception class of	OpenXPKI.

Description
       This is the basic exception class of OpenXPKI.

Intended use
       OpenXPKI::Exception->throw (message => "I18N_OPENXPKI_FAILED",
				   children  =>	[$other_exception],#opt.
				   params  => {FILENAME	=> $file});

       if (my $exc = OpenXPKI::Exception->caught()) {
	   ## handle it	or throw again
	   my $errno  =	$exc->errno();
	   my $errval =	$exc->as_string();
	   OpenXPKI::Exception->throw (message => ..., child =>	$exc, params
       => {...}); } else {
	   $EVAL_ERROR->rethrow(); }

       Please note that	FILENAME will be extended to __FILENAME__. If you want
       to send a specific errorcode to the caller then you can specify errno
       directly	like message, child or params.

New Functions
       usually all functions from Exception::Class will	be used. Nevertheless
       one function will be overloaded and on new function will	be specified
       to support other	modules	with errorcodes	if one is available.

   full_message
       This function is	used to	build the new errormessages conforming to the
       specifications of OpenXPKI. This	means in the first line	the
       specification of	i18n.

   message_code
       returns the untranslated	and unmodified i18n-message-code

   Fields
       returns the names of the	available parameters (message, errno, child,
       params).

   errno
       errno returns the errorcode if available.

   child
       returns the exception object of the child if this is a nested
       exception.

   params
       returns a hash reference	with name and value pairs of the parameters
       for the error message (i18nGettext).

perl v5.24.1			  2017-07-03		OpenXPKI::Exception(3)

Name | Description | Intended use | New Functions

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=OpenXPKI::Exception&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help