Custom Exceptions¶
The render_error() function can be used to render
multi-line error messages with stem.util.term colours.
The darc project provides following custom exceptions:
The darc project provides following custom exceptions:
-
exception
darc.error.APIRequestFailed¶ Bases:
WarningAPI submit failed.
-
exception
darc.error.FreenetBootstrapFailed¶ Bases:
WarningFreenet bootstrap process failed.
-
exception
darc.error.I2PBootstrapFailed¶ Bases:
WarningI2P bootstrap process failed.
-
exception
darc.error.SiteNotFoundWarning¶ Bases:
ImportWarningSite customisation not found.
-
exception
darc.error.TorBootstrapFailed¶ Bases:
WarningTor bootstrap process failed.
-
exception
darc.error.UnsupportedLink¶ Bases:
ExceptionThe link is not supported.
-
exception
darc.error.UnsupportedPlatform¶ Bases:
ExceptionThe platform is not supported.
-
exception
darc.error.UnsupportedProxy¶ Bases:
ExceptionThe proxy is not supported.
-
exception
darc.error.ZeroNetBootstrapFailed¶ Bases:
WarningZeroNet bootstrap process failed.
-
darc.error.render_error(message, colour)¶ Render error message.
The function wraps the
stem.util.term.format()function to provide multi-line formatting support.- Parameters
message (str) – Multi-line message to be rendered with
colour.colour (stem.util.term.Color) – Front colour of text, c.f.
stem.util.term.Color.
- Returns
The rendered error message.
- Return type
str