class_docstr: Specifies that the step will success under all circumstances.
  
  The decorator will create an optional artifact, specified by `var`, which
  contains the exception raised. You can use it to detect the presence
  of errors, indicating that all happy-path artifacts produced by the step
  are missing.
  
  Parameters
  ----------
  var : str, optional
      Name of the artifact in which to store the caught exception.
      If not specified, the exception is not stored.
  print_exception : bool, default: True
      Determines whether or not the exception is printed to
      stdout when caught.
class_docstr_tok: ["Specifies","that","the","step","will","success","under","all","circumstances",".","The","decorator","will","create","an","optional","artifact",",","specified","by","`","var","`",",","which","contains","the","exception","raised",".","You","can","use","it","to","detect","the","presence","of","errors",",","indicating","that","all","happy-path","artifacts","produced","by","the","step","are","missing",".","Parameters","--","--","--","--","--","var",":","str",",","optional","Name","of","the","artifact","in","which","to","store","the","caught","exception",".","If","not","specified",",","the","exception","is","not","stored",".","print_exception",":","bool",",","default",":","True","Determines","whether","or","not","the","exception","is","printed","to","stdout","when","caught","."]
code: def step_init(
      self,
      flow,
      graph,
      step,
      decos,
      environment,
      flow_datastore,
      logger,
  ):
      # handling _foreach_var and _foreach_num_splits requires some
      # deeper thinking, so let's not support that use case for now
      self.logger = logger
      if graph[step].type == "foreach":
          raise MetaflowException(
              "@catch is defined for the step *%s* "
              "but @catch is not supported in foreach "
              "split steps." % step
          )
  
file_path: metaflow/metaflow/plugins/catch_decorator.py
imports: import traceback
  from metaflow.exception import MetaflowException, MetaflowExceptionWrapper
  from metaflow.decorators import StepDecorator
  from metaflow import current
label_desc: Use image node_id 1 for calling the CatchDecorator obj's underlying member method code with example usage: obj.step_init(flow, graph, step, decos, environment, flow_datastore, logger) without return types