version 1.12, 2006/10/11 19:18:51
|
version 1.15, 2006/12/31 13:39:12
|
Line 1
|
Line 1
|
\ catch, throw, etc. |
\ catch, throw, etc. |
|
|
\ Copyright (C) 1999,2000,2003 Free Software Foundation, Inc. |
\ Copyright (C) 1999,2000,2003,2006 Free Software Foundation, Inc. |
|
|
\ This file is part of Gforth. |
\ This file is part of Gforth. |
|
|
Line 77 Defer store-backtrace
|
Line 77 Defer store-backtrace
|
\ !! explain handler on-stack structure |
\ !! explain handler on-stack structure |
|
|
Variable first-throw |
Variable first-throw |
: nothrow ( -- ) first-throw on ; |
: nothrow ( -- ) \ gforth |
|
\G Use this (or the standard sequence @code{['] false catch drop}) |
|
\G after a @code{catch} or @code{endtry} that does not rethrow; |
|
\G this ensures that the next @code{throw} will record a |
|
\G backtrace. |
|
first-throw on ; |
|
|
: (try) ( ahandler -- ) |
: (try) ( ahandler -- ) |
first-throw on |
first-throw on |
Line 162 is throw
|
Line 167 is throw
|
rdrop 'throw r> perform |
rdrop 'throw r> perform |
THEN ; |
THEN ; |
is rethrow |
is rethrow |
[THEN] |
|
|
|
|
[THEN] |