Skip to content

Text of thrown errors on highstes level should be printed also on Windows #81783

Open
@stefanspringer1

Description

@stefanspringer1

Motivation

With Swift 6.1.1 e.g. the program

import Foundation

let url = URL(string: "https://raw.githubusercontent.com/jmespath/jmespath.test/master/tests/filters.json")!
do {
    _ = try Data(contentsOf: url)
} catch {
    print(error.localizedDescription)
}

prints the "nice" error message The specified URL type isn’t supported. but the program

import Foundation

let url = URL(string: "https://raw.githubusercontent.com/jmespath/jmespath.test/master/tests/filters.json")!
_ = try Data(contentsOf: url)

does not print such an "understandable" error message. But it does so on Linux.

Proposed solution

It would be nice if in such a case the localizedDescription would also be printed on Windows.

Alternatives considered

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA feature request or implementationruntimeThe Swift Runtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions