aboutsummaryrefslogtreecommitdiff
path: root/jim.h.in
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2010-03-03 15:50:50 +1000
committerSteve Bennett <steveb@workware.net.au>2010-10-15 11:02:48 +1000
commit6a9fcd338b28fe76cb980867632068dd2bec533c (patch)
tree7e4046bd5d6ae0fa018dcfc51208c010b00ef472 /jim.h.in
parentec3d0d6cfddfa055d00c820a2ed99a7d6858aa82 (diff)
downloadjimtcl-6a9fcd338b28fe76cb980867632068dd2bec533c.zip
jimtcl-6a9fcd338b28fe76cb980867632068dd2bec533c.tar.gz
jimtcl-6a9fcd338b28fe76cb980867632068dd2bec533c.tar.bz2
Improvements to catch, return, signal, try
Improve the ability to rethrow errors * Allow return to rethrow an error by accepting '-errorinfo stacktrace' * Also, 'catch ... opts' now also stores opts(-errorinfo) on error * Use these to provide better stack traces from 'case' and 'try' * Implement 'return -level' Make try/on/finally more Tcl 8.6 compatible * With support for 'on' handlers and docs Add support for catch options to try * Otherwise it's hard to use try to catch signals Improvements to signal handling * catch -signal now sets a list of the handled signals as the result * catch -signal won't execute the body at all if a handled signal is pending * up to 64 (jim_wide) signals can now be handled * if catch -signal is nested, the innermost catch will catch the error * new 'signal catch' allows ignored/blocked signals to be examined and cleared. * update docs on signal handling exec should indicate which signal killed the child Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim.h.in')
-rw-r--r--jim.h.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/jim.h.in b/jim.h.in
index 81c9f70..e578c07 100644
--- a/jim.h.in
+++ b/jim.h.in
@@ -494,11 +494,12 @@ typedef struct Jim_Interp {
int numLevels; /* Number of current nested calls. */
int maxNestingDepth; /* Used for infinite loop detection. */
int returnCode; /* Completion code to return on JIM_RETURN. */
+ int returnLevel; /* Current level of 'return -level' */
int exitCode; /* Code to return to the OS on JIM_EXIT. */
- int signal; /* A caught signal, or 0 if none */
- int signal_level; /* A nesting level of catch -signal */
long id; /* Hold unique id for various purposes */
- const char *(*signal_to_name)(int sig); /* Returns a name for the signal number */
+ int signal_level; /* A nesting level of catch -signal */
+ jim_wide sigmask; /* Bit mask of caught signals, or 0 if none */
+ int (*signal_set_result)(struct Jim_Interp *interp, jim_wide sigmask); /* Set a result for the sigmask */
Jim_CallFrame *framePtr; /* Pointer to the current call frame */
Jim_CallFrame *topFramePtr; /* toplevel/global frame pointer. */
struct Jim_HashTable commands; /* Commands hash table */