Module pyboiler.error

Easy to use custom exceptions

Example usage:

from pyboiler.error import Error

class MyCustomError(Error):
    msg = "This is a custom error!"

raise MyCustomError()
raise MyCustomError("Failed because why not")

Classes

class Error (adtl=None)

Common base class for all non-exit exceptions.

Expand source code
class Error(Exception):
    msg = "None"

    def __init__(self, adtl=None):
        err_msg = self.msg
        if adtl is not None:
            err_msg += f" {adtl}"
        super().__init__(err_msg)

Ancestors

  • builtins.Exception
  • builtins.BaseException

Class variables

var msg