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
assertionFailurewith failure message - fail: Invoke
preconditonFailurewith 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
assertionFailurewith failure messageDeclaration
Swift
case assert -
Invoke
preconditonFailurewith failure messageDeclaration
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)
FaultResponse Enumeration Reference