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[source]
Bases: Warning
API submit failed.
-
exception
darc.error.FreenetBootstrapFailed[source]
Bases: Warning
Freenet bootstrap process failed.
-
exception
darc.error.I2PBootstrapFailed[source]
Bases: Warning
I2P bootstrap process failed.
-
exception
darc.error.LinkNoReturn[source]
Bases: Exception
The link has no return value from the hooks.
-
exception
darc.error.LockWarning[source]
Bases: Warning
Failed to acquire Redis lock.
-
exception
darc.error.RedisCommandFailed[source]
Bases: Warning
Redis command execution failed.
-
exception
darc.error.SiteNotFoundWarning[source]
Bases: ImportWarning
Site customisation not found.
-
exception
darc.error.TorBootstrapFailed[source]
Bases: Warning
Tor bootstrap process failed.
-
exception
darc.error.TorRenewFailed[source]
Bases: Warning
Tor renew request failed.
-
exception
darc.error.UnsupportedLink[source]
Bases: Exception
The link is not supported.
-
exception
darc.error.UnsupportedPlatform[source]
Bases: Exception
The platform is not supported.
-
exception
darc.error.UnsupportedProxy[source]
Bases: Exception
The proxy is not supported.
-
exception
darc.error.ZeroNetBootstrapFailed[source]
Bases: Warning
ZeroNet bootstrap process failed.
-
darc.error.render_error(message, colour)[source]
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