FaultResponse

public enum FaultResponse

Enum describing possible reponses to a failed invariant.

  • suppress: No action is taken.
  • warn: Print a warning message to the console
  • assert: Invoke assertionFailure with failure message
  • fail: Invoke preconditonFailure with failure message
  • custom: Invoke a custom handler with the falure message
  • No action is taken.

    Declaration

    Swift

    case suppress
  • Print a warning message to the console

    Declaration

    Swift

    case warn
  • Invoke assertionFailure with failure message

    Declaration

    Swift

    case assert
  • Invoke preconditonFailure with failure message

    Declaration

    Swift

    case fail
  • Invoke a custom handler with the failure message

    Declaration

    Swift

    case custom(handler: (String) -> Void)
  • Undocumented

    Declaration

    Swift

    public func evaluate(_ flag: Bool, _ message: @autoclosure () -> String, file: StaticString = #file, line: UInt = #line)