message -- explanation of the error
"""
- def __init__(self, message):
- self.args = message
- self.message = message
+ def __init__(self, message=""):
+ self.args = str(message)
+ self.message = str(message)
+
+ def __str__(self):
+ return self.message
__all__ = ['DakError']
"UnknownFormatError": """Exception raised for unknown Format: lines in changes files.""",
"NoFilesFieldError": """Exception raised for missing files field in dsc/changes.""",
"CantOpenError": """Exception raised when files can't be opened.""",
- "CantOverwriteError": """Exception raised when files cant be overwritten.""",
+ "CantOverwriteError": """Exception raised when files can't be overwritten.""",
"FileExistsError": """Exception raised when destination file exists.""",
"SendmailFailedError": """Exception raised when Sendmail invocation failed.""",
- "NoFreeFilenameError": """Exception raised when no alternate filename was found."""
+ "NoFreeFilenameError": """Exception raised when no alternate filename was found.""",
+ "TransitionsError": """Exception raised when transitions file can't be parsed.""",
+ "NoSourceFieldError": """Exception raised - we cant find the source - wtf?"""
}
-
def construct_dak_exception(name, description):
class Er(DakError):
__doc__ = description