Package nss :: Module error :: Class NSPRError
[hide private]
[frames] | no frames]

type NSPRError

              object --+        
                       |        
exceptions.BaseException --+    
                           |    
        exceptions.Exception --+
                               |
                              NSPRError
Known Subclasses:

NSPRError(error_message=None, error_code=None)

Exception object (derived from StandardException), raised when an NSS or NSPR error occurs. The error model in python-nss is anytime a NSS or NSPR C function returns an error the python-nss binding

raises a NSPRError exception.

Raised internally, there should be no need to raise this exception from with a Python program using python-nss.

The error_message is an optional string detailing the specifics of an error.

If the error_code is not passed then the current error is queried.

A NSPRError contains the following attributes:

error_code
The numeric NSPR or NSS error code (integer). If not passed the current NSPR or NSS error for the current thread is queried and substituted.
error_desc
Error description associated with error code (string).
error_message
Optional message with details specific to the error (string).
errno
Alias for error_code.
strerr
Alias for error_desc.
Instance Methods [hide private]
 
__init__(error_message=None, error_code=None)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__str__(x)
str(x)

Inherited from exceptions.Exception: __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __unicode__

Properties [hide private]
  errno
NSS error code
  error_code
NSS error code
  error_desc
NSS error code description
  error_message
error message specific to this error
  strerror
NSS error code description

Inherited from exceptions.BaseException: args, message

Method Details [hide private]

__init__(error_message=None, error_code=None)
(Constructor)

 
x.__init__(...) initializes x; see help(type(x)) for signature
Parameters:
  • error_message (string) - Detail message specific to this error.
  • error_code (int) - NSS or NSPR error value, if None get current error
Overrides: exceptions.BaseException.__init__

__str__(x)
(Informal representation operator)

 
str(x)
Overrides: exceptions.BaseException.__str__