Beispiel #1
0
def test_flyte_user_exception():
    try:
        raise user.FlyteUserException("bad")
    except Exception as e:
        assert str(e) == "bad"
        assert isinstance(type(e), base._FlyteCodedExceptionMetaclass)
        assert type(e).error_code == "USER:Unknown"
        assert isinstance(e, base.FlyteException)
Beispiel #2
0
 def add_inputs(self, inputs):
     raise _user_exceptions.FlyteUserException(
         "You can not add inputs to this task")
Beispiel #3
0
 def _local_execute(self, ctx: FlyteContext, **kwargs) -> Union[Tuple[Promise], Promise, None]:
     raise _user_exceptions.FlyteUserException("Local execute is not currently supported for pod tasks")