halerror package¶
Module contents¶
-
exception
halerror.HalError(message='', template=None)¶ Bases:
RuntimeErrorA sci-fi error message!
Example
>>> def open_pod_bay_doors(): ... raise HalError("Open the pod bay doors, HAL.")
-
__init__(message='', template=None)¶ Initialise the exception
- The template argument if present should be a format string containing:
- message: the error message
- username: the username
- The default template is:
- {message}\n\nI’m sorry, {username}. I’m afraid I can’t do that.
Parameters: - message (str) – The exception message.
- template (str) – The exception template.
-