Annotation of gforth/errors.fs, revision 1.5

1.1       pazsan      1: \ Load in error strings
                      2: 
1.3       anton       3: \ Copyright (C) 1995-1997 Free Software Foundation, Inc.
1.2       pazsan      4: 
                      5: \ This file is part of Gforth.
                      6: 
                      7: \ Gforth is free software; you can redistribute it and/or
                      8: \ modify it under the terms of the GNU General Public License
                      9: \ as published by the Free Software Foundation; either version 2
                     10: \ of the License, or (at your option) any later version.
                     11: 
                     12: \ This program is distributed in the hope that it will be useful,
                     13: \ but WITHOUT ANY WARRANTY; without even the implied warranty of
                     14: \ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     15: \ GNU General Public License for more details.
                     16: 
                     17: \ You should have received a copy of the GNU General Public License
                     18: \ along with this program; if not, write to the Free Software
                     19: \ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
                     20: 
1.4       jwilke     21: [IFUNDEF] linked \ defined by chains.fs?!
1.1       pazsan     22: : linked        here over @ a, swap ! ;
1.4       jwilke     23: [THEN]
1.1       pazsan     24: 
1.5     ! anton      25: : errstring ( addr u n -- )
        !            26:     ErrLink linked
        !            27:     ,
        !            28:     string, align ;
        !            29: 
        !            30: variable next-exception -2048 next-exception !
        !            31: 
        !            32: : exception ( addr u -- n )
        !            33:     \G @var{n} is a previously unused THROW value in the range
        !            34:     \G {-4095...-256}. Consecutive calls to EXCEPTION return
        !            35:     \G consecutive decreasing numbers. Gforth uses the string
        !            36:     \G @var{addr u} as error message.
        !            37:     next-exception @ errstring
        !            38:     next-exception @
        !            39:     -1 next-exception +! ;
1.1       pazsan     40: 
                     41: decimal
                     42: 
1.5     ! anton      43: -1 s" Aborted" rot errstring
        !            44: -3 s" Stack overflow" rot errstring
        !            45: -4 s" Stack underflow" rot errstring
        !            46: -5 s" Return stack overflow" rot errstring
        !            47: -6 s" Return stack undeflow" rot errstring
        !            48: -7 s" Do-loops nested too deeply" rot errstring
        !            49: -8 s" Dictionary overflow" rot errstring
        !            50: -9 s" Invalid memory address" rot errstring
        !            51: -10 s" Division by zero" rot errstring
        !            52: -11 s" Result out of range" rot errstring
        !            53: -12 s" Argument type mismatch" rot errstring
        !            54: -13 s" Undefined word" rot errstring
        !            55: -14 s" Interpreting a compile-only word" rot errstring
        !            56: -15 s" Invalid FORGET" rot errstring
        !            57: -16 s" Attempt to use zero-length string as a name" rot errstring
        !            58: -17 s" Pictured numeric ouput string overflow" rot errstring
        !            59: -18 s" Parsed string overflow" rot errstring
        !            60: -19 s" Word name too long" rot errstring
        !            61: -20 s" Write to a read-only location" rot errstring
        !            62: -21 s" Unsupported operation" rot errstring
        !            63: -22 s" Control structure mismatch" rot errstring
        !            64: -23 s" Address alignment exception" rot errstring
        !            65: -24 s" Invalid numeric argument" rot errstring
        !            66: -25 s" Return stack imbalance" rot errstring
        !            67: -26 s" Loop parameters unavailable" rot errstring
        !            68: -27 s" Invalid recursion" rot errstring
        !            69: -28 s" User interrupt" rot errstring
        !            70: -29 s" Compiler nesting" rot errstring
        !            71: -30 s" Obsolescent feature" rot errstring
        !            72: -31 s" >BODY used on non-CREATEd definition" rot errstring
        !            73: -32 s" Invalid name argument" rot errstring
        !            74: -33 s" Block read exception" rot errstring
        !            75: -34 s" Block write exception" rot errstring
        !            76: -35 s" Invalid block number" rot errstring
        !            77: -36 s" Invalid file position" rot errstring
        !            78: -37 s" File I/O exception" rot errstring
        !            79: -38 s" Non-existent file" rot errstring
        !            80: -39 s" Unexpected end of file" rot errstring
        !            81: -40 s" Invalid BASE for floating point conversion" rot errstring
        !            82: -41 s" Loss of precision" rot errstring
        !            83: -42 s" Floating-point divide by zero" rot errstring
        !            84: -43 s" Floating-point result out of range" rot errstring
        !            85: -44 s" Floating-point stack overflow" rot errstring
        !            86: -45 s" Floating-point stack underflow" rot errstring
        !            87: -46 s" Floating-point invalid argument" rot errstring
        !            88: -47 s" Compilation word list deleted" rot errstring
        !            89: -48 s" invalid POSTPONE" rot errstring
        !            90: -49 s" Search-order overflow" rot errstring
        !            91: -50 s" Search-order underflow" rot errstring
        !            92: -51 s" Compilation word list changed" rot errstring
        !            93: -52 s" Control-flow stack overflow" rot errstring
        !            94: -53 s" Exception stack overflow" rot errstring
        !            95: -54 s" Floating-point underflow" rot errstring
        !            96: -55 s" Floating-point unidentified fault" rot errstring
        !            97: -56 s" QUIT" rot errstring
        !            98: -57 s" Error in sending or receiving a character" rot errstring
        !            99: -58 s" [IF], [ELSE], [THEN] error" rot errstring

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>