Swift 3.0 allows the where
clause to be used in catch let
clause.
do {
let response = try HTTP("http://wrongdestination.com").performSync()
} catch let error as LakestoneError where error == HTTP.Request.Error.DestinationUnreachable {
print("Error encountered: \(error.representation)")
}
While catch let error as LakestoneError
is valid in silver, adding where
to it results in compiler complaining about the syntax.
Do you guys think it makes sense supporting such construct?