catchlib
Introduction

This project allows to catch exceptions easily.

Installation
Features
class catchlib.Catcher()

This class allows to catch exceptions.

catch(*args: type[BaseException]) -> contextlib.ContextDecorator

This contextmanager catches exceptions of the given types.

caught: Optional[BaseException] = None

This property stores the caught exception.

  • release(exc: BaseException) -> None
  • release(exc: BaseException, cause: Optional[BaseException]) -> None
This method raises and deletes the caught exception.
Testing
License
Impressum