don't add confusing source info to Jim

When an interactive command fails, the Jim stack trace prints references to
the line in "command.c" where the interpreter was invoked. Since that
location has no relation to the actual command that failed, the information
serves only to add confusion.

By not adding the useless source info to Jim the noise can be reduced,
while still printing a useful trace for nested commands.

Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
This commit is contained in:
Andreas Fritiofson 2010-06-18 00:48:47 +02:00 committed by Øyvind Harboe
parent c3ee63be77
commit 127f9da4fe

View File

@ -362,7 +362,7 @@ static int register_command_handler(struct command_context *cmd_ctx,
if (NULL == override_name)
return JIM_ERR;
retval = Jim_Eval_Named(interp, override_name, __THIS__FILE__ , __LINE__);
retval = Jim_Eval_Named(interp, override_name, 0, 0);
free((void *)override_name);
return retval;
@ -651,7 +651,7 @@ int command_run_line(struct command_context *context, char *line)
retcode = Jim_SetAssocData(interp, "retval", NULL, &retval);
if (retcode == JIM_OK)
{
retcode = Jim_Eval_Named(interp, line, __THIS__FILE__, __LINE__);
retcode = Jim_Eval_Named(interp, line, 0, 0);
Jim_DeleteAssocData(interp, "retval");
}