Hi all,
There are some cases for which I'd like to raise exception.
Like, for example:
s = Struct('a',
IfThenElse('b',
lambda ctx: True, # condition
Pass, # correct case, to be implemented
Error)) # raise exception
Currently I'm using Value for that with external function, as I can't raise exception in lambda:
def e(ctx):
raise NotImplementedError("{} not implemented".format(ctx.data))
Error in the above would look like:
Value('error', e)
I suppose such a type would be implemented in construct (or any wrapper in my code).
Do you know any solution to that?
Regards,
Robert