You are viewing a single comment's thread. Return to all comments →
I solved the exception handling error in Swift in this way.
func stringToInt(inputString: String) throws -> Int { let intValue = Int(inputString) return try intValue ?? { throw StringToIntTypecastingError.BadString }() }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 16: Exceptions - String to Integer
You are viewing a single comment's thread. Return to all comments →
I solved the exception handling error in Swift in this way.