Swift fangen
do {
let sandwich = try makeMeSandwich(kitchen)
} catch let error {
print(error.localizedDescription)
}
Testy Tortoise
do {
let sandwich = try makeMeSandwich(kitchen)
} catch let error {
print(error.localizedDescription)
}
do {
try expression
statements
} catch pattern1 {
statements
} catch pattern2 where condition {
statements
} catch pattern3, pattern4 where condition {
statements
} catch {
statements
}