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
finalkeyword do, and why would you want to use it?
Link copied to your pasteboard.