Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSwiftcustom error typesSingle-choice MCQ

When defining a custom error type, what does conforming to `LocalizedError` (rather than just `Error`) change about this code's output?

enum NetworkError: LocalizedError { case timeout var errorDescription: String? { "Request timed out" } } let e: Error = NetworkError.timeout print(e.localizedDescription)