Go to repository

Function runOrEnd

Run a function and print an error message if it fails. The action is expected to be executed and produce an error with a given message in some cases. errorsAndMessages matches on those inner messages and outputs the associated message to the user in a style with red background.

Parameters

  • action: (() => void)

    A function to be executed and catch on failure.

      • (): void
      • Returns void

Returns void