Skip to content

v1.2.0 - raise_if_err() alias for expect()

Compare
Choose a tag to compare
@mplanchard mplanchard released this 09 Jan 19:33
· 22 commits to master since this release

Added

  • Result.raise_if_err(self, msg: str, exc_cls: t.Type[Exception] = RuntimeError) -> T
    added as a semantically friendly alias for Result.expect (thanks @MustardForBreakfast!)
  • Option.raise_if_err(self, msg: str, exc_cls: t.Type[Exception] = RuntimeError) -> T
    added as a semantically friendly alias for Option.expect (thanks @MustardForBreakfast!)