Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
xpcom.ServerException Class Reference
Inheritance diagram for xpcom.ServerException:
Inheritance graph
[legend]
Collaboration diagram for xpcom.ServerException:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __str__

Public Attributes

 errno
 message

Detailed Description

Definition at line 87 of file __init__.py.


Constructor & Destructor Documentation

def xpcom.ServerException.__init__ (   self,
  errno = None,
  args,
  kw 
)

Definition at line 88 of file __init__.py.

00088 
00089     def __init__(self, errno=None, *args, **kw):
00090         if errno is None:
00091             import nsError
00092             errno = nsError.NS_ERROR_FAILURE
00093         Exception.__init__(self, errno, *args, **kw)
00094 
00095 # Some global functions.

Member Function Documentation

def xpcom.Exception.__str__ (   self) [inherited]

Definition at line 64 of file __init__.py.

00064 
00065     def __str__(self):
00066         if not hr_map:
00067             import nsError
00068             for name, val in nsError.__dict__.items():
00069                 if type(val)==type(0):
00070                     hr_map[val] = name
00071         message = self.message
00072         if message is None:
00073             message = hr_map.get(self.errno)
00074             if message is None:
00075                 message = ""
00076         return "0x%x (%s)" % (self.errno, message)
00077 
00078 # An alias for Exception - allows code to say "from xpcom import COMException"
# rather than "Exception" - thereby preventing clashes.

Member Data Documentation

xpcom.Exception.errno [inherited]

Definition at line 61 of file __init__.py.

Definition at line 62 of file __init__.py.


The documentation for this class was generated from the following file: