Suggested approach: A regular
try requires you to catch errors,
try? converts the throwing call into an optional where you’ll get back
nil on failure, and
try! will cause your app to crash if the throwing call fails. All three have their uses, so don’t dismiss one out of hand.
Estimated difficulty: Easy
#errorcompiler directive do?
deferkeyword in Swift?
Link copied to your pasteboard.