THROW-codes used in the system: ¶The codes -256−-511 are used for reporting signals. The mapping from OS signal numbers to throw codes is -256−signal.
The codes -512−-2047 are used for OS errors (for file and
memory allocation operations). The mapping from OS error numbers to
throw codes is -512−errno. One side effect of this
mapping is that undefined OS errors produce a message with a strange
number; e.g., -1000 THROW results in Unknown error 488
on my system.
You can allocate an exception number in the range (-4095...-256) with
exception. Gforth has allocated a number of such exceptions
itself.