Contents

finishRunningWithError(_:)

Causes the action to stop running and return an error, which, in turn, causes the workflow to stop.

Declaration

func finishRunningWithError(_ error: (any Error)?)

Parameters

  • error:

    The error to be returned to Automator.

Discussion

Call this method on any action that overrides runAsynchronously(withInput:) in order to make asynchronous calls. When finishRunningWithError(_:) is invoked, it immediately calls willFinishRunning().

See Also

Controlling the Action