home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Shareware / Comunicatii / jyte / jyte.exe / error.py < prev    next >
Text File  |  1999-09-02  |  551b  |  19 lines

  1. """Exception instance for AXScript servers.
  2.  
  3. This module implements an exception instance that is raised by the core 
  4. server scripting support.
  5.  
  6. When a script error occurs, it wraps the COM object that describes the
  7. exception in a Python instance, which can then be raised and caught.
  8. """
  9.  
  10. class Exception:
  11.     def __init__(self, activeScriptError):
  12.         self.activeScriptError = activeScriptError
  13.     def __getattr__(self, attr):
  14.         try:
  15.             return getattr(self.activeScriptError, attr)
  16.         except AttributeError:
  17.             raise AttributeError, attr
  18.  
  19.