def add_catch()

in src/stepfunctions/steps/states.py [0:0]


    def add_catch(self, catch):
        """
        Add a catcher or a list of catchers to the tail end of the list of catchers for the state.
        See `Error handling in Step Functions <https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html#error-handling-fallback-states>`_ for more details.

        Args:
            catch (Catch or list(Catch): catcher or list of catchers to add.
        """
        if Field.Catch in self.allowed_fields():
            self.catches.extend(catch) if isinstance(catch, list) else self.catches.append(catch)
        else:
            raise ValueError(f"{type(self).__name__} state does not support catch field. ")