2024-12-03 01:17 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000546mercuryFeature Requestpublic2022-02-07 16:56
Reporterwangp 
Assigned To 
PrioritynormalSeverityminorReproducibilityN/A
StatusnewResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000546: make io.system_error public
DescriptionAs discussed on mercury-users (05 Feb 2022) we should give access to the system error code from an io.error value. Something like this:

    % implementation
    :- type io.error
        ---> io_error(system_error, string).

    :- func make_io_error(system_error, string) = io.error.

    :- pred get_system_error(io.error::in, system_error::out)
        is semidet.


(Assign yourself if you want to work on it.)
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0001170

juliensf (administrator)

A complication here is that on Windows, there are two different sets of error codes: one for the system calls and another for the library functions that report their errors via errno. Currently we don't distinguish between the two, which means any potential user of a public system_error type won't know which is which.
+Notes

-Issue History
Date Modified Username Field Change
2022-02-07 14:34 wangp New Issue
2022-02-07 16:56 juliensf Note Added: 0001170
+Issue History