--- v3/execute.c 2010-06-29 23:30:12.000000000 +0200 +++ v4/execute.c 2010-06-30 02:22:05.000000000 +0200 @@ -465,16 +465,26 @@ int handler_activ = find_handler_activ(p.u.raise.code); Finally_Reason why; Var value; + Stream *s = new_stream(25); if (handler_activ >= 0) { /* handler found */ why = FIN_RAISE; value = new_list(4); } else { /* uncaught exception */ why = FIN_UNCAUGHT; - value = new_list(5); + value = new_list(6); value.v.list[5] = error_backtrace_list(p.u.raise.msg); + value.v.list[6].type = TYPE_STR; + stream_add_string(s, activ_stack[0].verb); + if (strcmp(activ_stack[0].rt_env[SLOT_ARGSTR].v.str, "") != 0) { + stream_add_char(s, ' '); + stream_add_string(s, activ_stack[0].rt_env[SLOT_ARGSTR].v.str); + } + value.v.list[6].v.str = str_dup(stream_contents(s)); handler_activ = 0; /* get entire stack in list */ } + free_stream(s); + value.v.list[1] = p.u.raise.code; value.v.list[2].type = TYPE_STR; value.v.list[2].v.str = p.u.raise.msg; @@ -496,6 +506,7 @@ Var value; const char *msg; const char *htag; + Stream *s = new_stream(25); switch(reason) { default: @@ -512,12 +523,22 @@ htag = "seconds"; save_hinfo: - value = new_list(3); + value = new_list(4); value.v.list[1].type = TYPE_STR; value.v.list[1].v.str = str_dup(htag); value.v.list[2] = make_stack_list(activ_stack, 0, top_activ_stack, 1, root_activ_vector, 1); value.v.list[3] = error_backtrace_list(msg); + value.v.list[4].type = TYPE_STR; + stream_add_string(s, activ_stack[0].verb); + if (strcmp(activ_stack[0].rt_env[SLOT_ARGSTR].v.str, "") != 0) { + stream_add_char(s, ' '); + stream_add_string(s, activ_stack[0].rt_env[SLOT_ARGSTR].v.str); + } + + value.v.list[4].v.str = str_dup(stream_contents(s)); + free_stream(s); + save_handler_info("handle_task_timeout", value); /* fall through */ @@ -525,7 +546,7 @@ (void) unwind_stack(FIN_ABORT, zero, 0); } } /**** activation manipulation ****/ static int @@ -2289,14 +2310,13 @@ } } i = args.v.list[0].v.num; - traceback = args.v.list[i]; /* traceback is always the last argument */ + traceback = args.v.list[i - 1]; /* traceback is the second-last argument */ for (i = 1; i <= traceback.v.list[0].v.num; i++) notify(activ_stack[0].player, traceback.v.list[i].v.str); } free_var(args); return ret; }