SPOPS::Exception::LDAP - SPOPS exception with extra LDAP parameters


SPOPS documentation  | view source Contained in the SPOPS distribution.

Index


NAME

Top

SPOPS::Exception::LDAP - SPOPS exception with extra LDAP parameters

SYNOPSIS

Top

 my $iterator = eval { My::LDAPUser->fetch_iterator };
 if ( $@ and $@->isa( 'SPOPS::Exception::LDAP' ) ) {
     print "Failed LDAP execution with: $@\n",
           "Action: ", $@->action, "\n",
           "Code: ", $@->code, "\n",
           "Error Name: ", $@->error_name, "\n",
           "Error Text: ", $@->error_text, "\n",
 }

DESCRIPTION

Top

Same as SPOPS::Exception but we add four new properties:

code ($)

The LDAP code returned by the server.

action ($)

The LDAP action we were trying to execute when the error occurred.

error_name ($)

Name of the error corresponding to code as returned by Net::LDAP::Util.

error_text ($)

Text of the error corresponding to code as returned by Net::LDAP::Util. This is frequently the same as the error message, but not necessarily.

METHODS

Top

No extra methods, but you can use a shortcut if you are throwing errors:

 use SPOPS::Exception::LDAP qw( spops_ldap_error );

 ...
 spops_ldap_error "I found an LDAP error with code ", $ldap->code, "...";

BUGS

Top

None known.

TO DO

Top

Nothing known.

SEE ALSO

Top

SPOPS::Exception

Net::LDAP

Net::LDAP::Util

COPYRIGHT

Top

AUTHORS

Top

Chris Winters <chris@cwinters.com>


SPOPS documentation  | view source Contained in the SPOPS distribution.