def exception_handler()

in terraform-modules/cloud-functions/src/provide-billing-permissions/main.py [0:0]


def exception_handler(function,message):
  """Function to handle exceptions and exit.
  Args:
      function (string); name of the function
      message(string); error message

  Returns:
      NA
  """
  import sys
  print('Function ' + function + ' failed with the following error: ' + message)
  print('Exiting with status code 1..')
  sys.exit(1)