1/10: This code should define an error enum, then create a function that makes pizza – but only if it doesn't have pineapple.
Make sure you define the enum before the class.
} else {
func makePizza(type: String) throws {
}
}
enum PizzaErrors: Error {
print("Your pizza will be ready in 10 minutes.")
throw PizzaErrors.hasPineapple
}
case hasPineapple
if type != "Hawaiian" {
Link copied to your pasteboard.