tinyscheme: enhance: rearrange error msg so error kind is stable prefix

Error kind should be first to read, is most important.

Makes testing error message easier when prefix is stable.
This commit is contained in:
bootchk 2023-09-06 06:03:49 -04:00
parent 14c30f6514
commit 61c1acbead

View file

@ -2664,7 +2664,8 @@ static pointer _Error_1(scheme *sc, const char *s, pointer a) {
/* we started from 0 */
ln++;
snprintf(sbuf, STRBUFFSIZE, "(%s : %i) %s", fname, ln, s);
/* Err kind s is first, to have a stable prefix for testing. */
snprintf(sbuf, STRBUFFSIZE, "%s (%s : %i) ", s, fname, ln);
str = (const char*)sbuf;
}