This is nice. It's starting to look more like a generic error SRFI,
giving the ability to tack arbitrary metadata onto errors (some of it
standardized), than an OS-error-only SRFI.
In that case it should be backward compatible with the procedures in R7RS-smal section 6.11, I think. There's precedent for SRFIs to say "If you conform to this SRFI, you have to do these standard things in this SRFI-compatible way." The SRFI introducing parameters had language to compel its implementers to treat current-input and current-output as parameters, for example.
> As previously discussed, we can use a short abbreviation to make the
> source of error codes more obviously, like Oracle's "ORA-".
That's carried over from VAX/VMS, which had a unified error system: facility, severity, message identifier, descriptive text, displayed like "%MSGHLP-F-MDFERR, error accessing Help Message database file "TOOLS:[MYPROJ]MYMESSAGES.MSGHLP$DATA". The severities are Success, Information, Warning, Error, Fatal/severe. Of course, Success would not normally be signaled, and Warning would normally be signaled continuably.
(I do wish in hindsight that there was some way for an exception handler to know if the exception was signaled continuably or not; some systems make this distinction in the *condition*, but I think that's the Wrong Thing. A condition represents a particular state of affairs: whether it is raised continuably or non-continuably depends on the ability of the signaler to recover. See also <
https://bitbucket.org/cowan/r7rs-wg1-infra/src/default/RestartsCowan.md>.)
This of course looks a lot like syslog, and if we adopt something like it, we should make sure a syslog SRFI (which wouldb e a Good Thing) uses it too.
VAX/VMS-style errors are a good application for a p-list. General principle on p-lists: don't use them for mandatory things. So message text, for instance, shouldn't be in the p-list, since it is always required (there is no sensible default).
John Cowan
http://vrici.lojban.org/~cowan xxxxxx@ccil.orgBig as a house, much bigger than a house, it looked to [Sam], a grey-clad
moving hill. Fear and wonder, maybe, enlarged him in the hobbit's eyes,
but the Mumak of Harad was indeed a beast of vast bulk, and the like of him
does not walk now in Middle-earth; his kin that live still in latter days are
but memories of his girth and his majesty. --"Of Herbs and Stewed Rabbit"