catchlib

Version:

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() -> None
  • release(cause: Optional[BaseException]) -> None
This method raises and deletes the caught exception.
catchlib.test() -> unittest.TextTestRunner
License
Impressum