object = Apply(exceptionHandler, func , args )
Calls a Python function, but traps Win32 exceptions.
Return value | Description |
Tuple of (exc_type, exc_value) | This exception is raised to the Python caller of Apply() - This is conceptually similar to "raise exc_type, exc_value", although exception handlers must not themselves raise exceptions (see below). |
Integer | Must be one of the win32 exception constants, and this value is returned to Win32. See the Win32 documentation for details. |
None | The exception is considered not handled (ie, it is as if no exception handler exists). If a Python exception occurs in the Win32 exception handler, it is as if None were returned (ie, no tracebacks or other diagnostics are printed) |