Commit 46fd4d5b authored by Valentin Samir's avatar Valentin Samir
Browse files

Error more verbose

parent b5faf21e
......@@ -81,8 +81,10 @@ if sys.hexversion < 0x02030000:
# hierarchy, don't forget to update the module's docstring.
class error(Exception):
"""Base class for exceptions in pythondialog."""
def __init__(self, message=None):
def __init__(self, message=None, *args):
self.message = message
self.args = (message,) + args
def __str__(self):
return "<%s: %s>" % (self.__class__.__name__, self.message)
def complete_message(self):
......@@ -783,7 +785,7 @@ class Dialog:
elif os.WIFSIGNALED(exit_info):
raise DialogTerminatedBySignal("the dialog-like program was "
"terminated by signal %u" %
os.WTERMSIG(exit_info), os.WTERMSIG(exit_info))
raise PythonDialogBug("please report this bug to the "
"pythondialog maintainers")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment