Skip to content

Instantly share code, notes, and snippets.

@sturdysturge
Created June 27, 2022 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sturdysturge/9ad0cb3c7d90faf01b98fa3b92d8682f to your computer and use it in GitHub Desktop.
Save sturdysturge/9ad0cb3c7d90faf01b98fa3b92d8682f to your computer and use it in GitHub Desktop.
import Foundation
@available(iOS 16.0, *)
struct MyErrors {
static var wrongError: Never {
fatalError("That was wrong")
}
static var badError: Never {
fatalError("That was bad")
}
static var worstError: Never {
fatalError("That was the worst")
}
static func createError(text: String) -> Never {
fatalError(text)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment