Skip to content

<system_error>: Several Windows system errors are not mapped #2893

@Morph1984

Description

@Morph1984

Describe the bug
Several Windows system error codes are not mapped in syserror.cpp

https://github.com/microsoft/STL/blob/main/stl/src/syserror.cpp#L27

The description for each of the errors are as follows:
ERROR_FILENAME_EXCED_RANGE -> The filename or extension is too long.
ERROR_BAD_NET_NAME -> The network name cannot be found.
ERROR_NO_MORE_FILES -> There are no more files.

Command-line test case

std::errc::filename_too_long == std::error_code{ERROR_FILENAME_EXCED_RANGE, std::system_category()}; // false
std::errc::no_such_file_or_directory == std::error_code{ERROR_BAD_NET_NAME, std::system_category()}; // false
std::errc::no_such_file_or_directory == std::error_code{ERROR_NO_MORE_FILES, std::system_category()}; // false

Expected behavior
ERROR_FILENAME_EXCED_RANGE should be mapped to std::errc::filename_too_long (ENAMETOOLONG)
ERROR_BAD_NET_NAME and ERROR_NO_MORE_FILES should be mapped to std::errc::no_such_file_or_directory (ENOENT)

STL version
The latest commit manifests this behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSomething can be improvedfixedSomething works now, yay!

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions