8 lines
159 B
Swift
8 lines
159 B
Swift
|
|
do {
|
||
|
|
try foo()
|
||
|
|
} catch MyException.TerribleException { // this can be any pattern
|
||
|
|
//Catch a specific case of exception
|
||
|
|
} catch {
|
||
|
|
//Catch any exception
|
||
|
|
}
|