def fail!(message: nil, exception_class: RuntimeError, exit_status: 1)
      if Origen.debug?
        # rubocop:disable Style/RedundantSelf
        self.fail(message: message, exception_class: exception_class)
        # rubocop:enable Style/RedundantSelf
      else
        begin
          # rubocop:disable Style/RedundantSelf
          self.fail(message: message, exception_class: exception_class)
          # rubocop:enable Style/RedundantSelf
        rescue exception_class => e
          Origen.log.error(e.message)
          exit exit_status
        end
      end
    end
def fail!(message: nil, exception_class: RuntimeError, exit_status: 1)
      if Origen.debug?
        # rubocop:disable Style/RedundantSelf
        self.fail(message: message, exception_class: exception_class)
        # rubocop:enable Style/RedundantSelf
      else
        begin
          # rubocop:disable Style/RedundantSelf
          self.fail(message: message, exception_class: exception_class)
          # rubocop:enable Style/RedundantSelf
        rescue exception_class => e
          Origen.log.error(e.message)
          exit exit_status
        end
      end
    end
Similar to Origen.app.fail, but will instead print the message using Origen.log.error and exit the current process (using <code>exit 1</code>)
 UNLESS --debug is used. In those cases, <code>exit</code> will not be used and instead this will behave the same as {Origen::Application#fail}.
 Purpose here is to allow fail! for normal usage, but provide more details as to where fail! was used when running in debug.
 @param message [String] Message to print with the exception. If the message option is nil, a default message will be used instead.
 @param exception_class [Class] Custom Exception class to throw. May require the full namespace.
 @param exit_status [Integer] Exit status to use when exiting the application.
 @raise [RuntimeError, SystemExit, exception_class] When debug is disabled, <code>SystemExit</code> will be raised.
   When debug is enabled, exception_class will be raised, defaulting to <code>RuntimeError</code>.