Module spangle.error_handler¶
Application blueprint for Exception
.
Classes¶
ErrorHandler¶
class ErrorHandler(self)
When exceptions are raised, Api
calls registered view.
Initialize self.
Methods¶
def handle(
self, e: type[Exception]
) -> Callable[[type[ErrorHandlerProtocol]], type[ErrorHandlerProtocol]]
Bind Exception
to the decolated view.
Args
- e (
type[Exception]
): Subclass ofException
you want to handle.