Hi, is it possible to catch a specific exception r...
# ask-metaflow
f
Hi, is it possible to catch a specific exception rather than any/all exception thrown from a step using
@catch
?
a
If it is an exception in user land, you can catch it in a
try... except...
block
f
The thing is I am raising a custom exception and I want to run another step if only this exception is thrown, otherwise for any other exception that I don't catch, i want my flow to terminate
a
you should be able to achieve that with
try... except...
block - catch your custom exception so that the task doesn't fail and don't use the
@catch
decorator.