home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
c't freeware shareware 1997
/
CT_SW_97.ISO
/
mac
/
Software
/
entwickl
/
win95
/
pythowin.exe
/
DATA.3
/
win32com
/
server
/
exception.py
< prev
next >
Wrap
Text File
|
1997-01-28
|
898b
|
25 lines
"""Exceptions
To better support COM exceptions, the framework allows for an instance to be
raised. This instance may have a certain number of known attributes, which are
translated into COM exception details.
This means, for example, that Python could raise a COM exception that includes details
on a Help file and location, and a description for the user.
This module provides a class which provides the necessary attributes.
"""
class Exception:
def __init__(self, description = None, scode = None,
source = None, helpfile = None, helpContext = None,
desc = None):
if description: self.description = description
if desc: self.description = desc
if scode: self.scode = scode
if source: self.source = source
# def __repr__(self):
# return "<a COM Exception - desc=%s, scode=%s>" % (`self.description`, `self.scode`)