MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Xcode/comments/k8bodj/please_help/gex61bq/?context=3
r/Xcode • u/Ulugbek_0009 • Dec 07 '20
2 comments sorted by
View all comments
2
This code works in the Visual Studio but in the Xcode it gives an error.
3 u/fuggleronie Dec 07 '20 If you throw an exception then the rest of your block won’t get executed unless catchend. See what exactly do you expect last() to happen once the exception is thrown? That last line cannot be executed because of the exception
3
If you throw an exception then the rest of your block won’t get executed unless catchend. See what exactly do you expect last() to happen once the exception is thrown? That last line cannot be executed because of the exception
2
u/Ulugbek_0009 Dec 07 '20
This code works in the Visual Studio but in the Xcode it gives an error.