Skip to content

Module spangle.error_handler

Application blueprint for Exception.

Classes

ErrorHandler

class ErrorHandler(self)

When exceptions are raised, Api calls registered view.

Initialize self.


Methods

handle

def handle(
    self, e: type[Exception]
    ) -> Callable[[type[ErrorHandlerProtocol]], type[ErrorHandlerProtocol]]

Bind Exception to the decolated view.

Args

  • e (type[Exception]): Subclass of Exception you want to handle.