What does this program print?
swift
enum LoadError: Error {
case missing(Int)
}
func load(id: Int) throws -> String {
guard id > 0 else { throw LoadError.missing(id) }
return "order-\(id)"
}
for id in [4, 0] {
do {
print(try load(id: id))
} catch LoadError.missing(let value) {
print("missing: \(value)")
} catch {
print("other")
}
}