Avatar
swiftbot BOT 5/15/2018 8:21 AM
Author icon
t.ae
struct MyError: Error {} do { throw MyError() } catch is MyError { print("my error: \(error)") } catch { print("\(error)") }
Version:
swift-4.1.1-RELEASE
Output:
Error:
/usercode/main.swift:5:24: error: use of unresolved identifier 'error' print("my error: \(error)") ^~~~~ Swift.Error:1:17: note: did you mean 'Error'? public protocol Error { ^ Swift.Mirror:1:15: note: did you mean 'Mirror'? public struct Mirror { ^