This code is not compiling on Swift 3.3. It's showing the message: 'self' used inside 'catch' block reachable from super.init call
public class MyRegex : NSRegularExpression {
public init(pattern: String) {
do {
try super.init(pattern: pattern)
} catch {
print("error parsing pattern")
}
}
}
What could that be?