How to convert errors to optional values in Swift?

We can convert errors to optional value by using try?..try!.

If we want to disable error propagation (knowing that error won’t be happening) we can use try! instead of try?

Leave a Reply