In johnwcowan/srfi-170 repo, the posix error object is required to include scheme procedure name and scheme procedure arguments.
If a posix error is only thrown from srfi-170 APIs, it is clear where those information comes from. However, it can be raised from a different places---e.g. an implementation's runtime may be written partially in C and one of such runtime can throw an error on EPERM. The runtime written in C may be called from multiple Scheme procedures and may not have these information.
- Shall we limit posix error to be thrown only from srfi-170 API (or similar ones that the correspondence of Scheme procedures and underlying POSIX call is clear)?
- Or shall we allow these information to be #f when unavailable?
In Gauche, POSIX errors are mapped to <system-error> object regardless of where it occurs, and those info isn't readily available (It can inspect Scheme VM stack to retrieve those info, though.)