From 127f9da4fe0a3e2eaa86c5cd32bb45b6a7083171 Mon Sep 17 00:00:00 2001 From: Andreas Fritiofson Date: Fri, 18 Jun 2010 00:48:47 +0200 Subject: don't add confusing source info to Jim MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Øyvind Harboe --- src/helper/command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/helper') diff --git a/src/helper/command.c b/src/helper/command.c index be262f2e..ea768b2d 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -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"); } -- cgit v1.2.3