pythondialog-specific exceptions¶
Class hierarchy¶
Here is the hierarchy of notable exceptions raised by this module:
PythonDialogIOError  (should not be raised starting from
Python 3.3, as IOError becomes
an alias of OSError)As you can see, every exception exc among them verifies:
issubclass(exc, error)
so if you don’t need fine-grained error handling, simply catch error
(which will probably be accessible as dialog.error from your program)
and you should be safe.
Changed in version 2.12: PythonDialogIOError is now a subclass of PythonDialogOSError
in order to help with the transition from IOError to OSError
in the Python language. With this change, you can safely replace except
PythonDialogIOError clauses with except PythonDialogOSError even if
running under Python < 3.3.
Detailed list¶
- 
exception dialog.ExecutableNotFound(message=None)[source]¶
- Bases: - dialog.error- Exception raised when the dialog executable can’t be found. 
- 
exception dialog.BadPythonDialogUsage(message=None)[source]¶
- Bases: - dialog.error- Exception raised when pythondialog is used in an incorrect way. 
- 
exception dialog.PythonDialogSystemError(message=None)[source]¶
- Bases: - dialog.error- Exception raised when pythondialog cannot perform a “system operation” (e.g., a system call) that should work in “normal” situations. - This is a convenience exception: - PythonDialogIOError,- PythonDialogOSErrorand- PythonDialogErrorBeforeExecInChildProcessall derive from this exception. As a consequence, watching for- PythonDialogSystemErrorinstead of the aformentioned exceptions is enough if you don’t need precise details about these kinds of errors.- Don’t confuse this exception with Python’s builtin - SystemErrorexception.
- 
exception dialog.PythonDialogOSError(message=None)[source]¶
- Bases: - dialog.PythonDialogSystemError- Exception raised when pythondialog catches an - OSErrorexception that should be passed to the calling program.
- 
exception dialog.PythonDialogIOError(message=None)[source]¶
- Bases: - dialog.PythonDialogOSError- Exception raised when pythondialog catches an - IOErrorexception that should be passed to the calling program.- This exception should not be raised starting from Python 3.3, as the built-in exception - IOErrorbecomes an alias of- OSError.- Changed in version 2.12: - PythonDialogIOErroris now a subclass of- PythonDialogOSErrorin order to help with the transition from- IOErrorto- OSErrorin the Python language. With this change, you can safely replace- except PythonDialogIOErrorclauses with- except PythonDialogOSErroreven if running under Python < 3.3.
- 
exception dialog.PythonDialogErrorBeforeExecInChildProcess(message=None)[source]¶
- Bases: - dialog.PythonDialogSystemError- Exception raised when an exception is caught in a child process before the exec sytem call (included). - This can happen in uncomfortable situations such as: - the system being out of memory; 
- the maximum number of open file descriptors being reached; 
- the dialog-like program being removed (or made non-executable) between the time we found it with - _find_in_path()and the time the exec system call attempted to execute it;
- the Python program trying to call the dialog-like program with arguments that cannot be represented in the user’s locale ( - LC_CTYPE).
 
- 
exception dialog.PythonDialogReModuleError(message=None)[source]¶
- Bases: - dialog.PythonDialogSystemError- Exception raised when pythondialog catches a - re.errorexception.
- 
exception dialog.UnexpectedDialogOutput(message=None)[source]¶
- Bases: - dialog.error- Exception raised when the dialog-like program returns something not expected by pythondialog. 
- 
exception dialog.DialogTerminatedBySignal(message=None)[source]¶
- Bases: - dialog.error- Exception raised when the dialog-like program is terminated by a signal. 
- 
exception dialog.DialogError(message=None)[source]¶
- Bases: - dialog.error- Exception raised when the dialog-like program exits with the code indicating an error. 
- 
exception dialog.UnableToRetrieveBackendVersion(message=None)[source]¶
- Bases: - dialog.error- Exception raised when we cannot retrieve the version string of the dialog-like backend. - New in version 2.14. 
- 
exception dialog.UnableToParseBackendVersion(message=None)[source]¶
- Bases: - dialog.error- Exception raised when we cannot parse the version string of the dialog-like backend. - New in version 2.14. 
- 
exception dialog.UnableToParseDialogBackendVersion(message=None)[source]¶
- Bases: - dialog.UnableToParseBackendVersion- Exception raised when we cannot parse the version string of the dialog backend. - New in version 2.14. 
- 
exception dialog.InadequateBackendVersion(message=None)[source]¶
- Bases: - dialog.error- Exception raised when the backend version in use is inadequate in a given situation. - New in version 2.14. 
- 
exception dialog.PythonDialogBug(message=None)[source]¶
- Bases: - dialog.error- Exception raised when pythondialog finds a bug in his own code. 
- 
exception dialog.ProbablyPythonBug(message=None)[source]¶
- Bases: - dialog.error- Exception raised when pythondialog behaves in a way that seems to indicate a Python bug.