Source code for extorch.utils.exception
[docs]def expect(bool_expr: bool, message: str = "", exception_type: Exception = ExtorchException):
if not bool_expr:
raise exception_type(message)
[docs]def expect(bool_expr: bool, message: str = "", exception_type: Exception = ExtorchException):
if not bool_expr:
raise exception_type(message)