1.

How should errors be handled in Swift?

Answer»

The WAY to handle errors in Swift is DIFFERENT from Objective-C. In Swift, you can declare that a function has thrown an error. A function that calls this METHOD MUST do it from a try block. It is the caller's responsibility to handle the error. This process is QUITE similar to how we handle errors in Java.



Discussion

No Comment Found