Advanced Swift: Error Handling, Episode 5: Handling Objective C Errors | Kodeco, the new

App developers deal with errors from UIKit and other Objective-C libraries. Find out how they work with Swift.

This is a companion discussion topic for the original entry at

Not entirely sure when it has changed, but it looks like catching an error with associated value as an NSError no longer loses the associated value.

enum FancyError: Error {
  case kazam(String)

do {
  throw FancyError.kazam("Help")
catch (let error as NSError) {


- __lldb_expr_28.FancyError.kazam("Help") #0
  - super: NSError
    - super: NSObject

Great job on posting your question! Thank you for your positive feedback about the tutorial. It’s always encouraging to hear that our content is helpful.

We will be happy to provide further assistance and address any concerns you may have. We appreciate your participation in our forum!

@rayfix, please your feedbacks would be appreciated.