diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-08-11 10:30:36 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-08-11 10:30:36 +0000 |
commit | 1ee637287e5f4233ab9e7a34c7e7229eb69ba894 (patch) | |
tree | cd974ee145b4f20b766f55eeec466898ce58746d /src/helper | |
parent | 47ae48bff73efe8a0bf44839fc180eef2c834976 (diff) | |
download | openocd+libswd-1ee637287e5f4233ab9e7a34c7e7229eb69ba894.tar.gz openocd+libswd-1ee637287e5f4233ab9e7a34c7e7229eb69ba894.tar.bz2 openocd+libswd-1ee637287e5f4233ab9e7a34c7e7229eb69ba894.tar.xz openocd+libswd-1ee637287e5f4233ab9e7a34c7e7229eb69ba894.zip |
fix error output a bit: do not repeat output printed during execution in case of error.
git-svn-id: svn://svn.berlios.de/openocd/trunk@905 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper')
-rw-r--r-- | src/helper/command.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helper/command.c b/src/helper/command.c index 7dc62dd5..7ce7c224 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -209,7 +209,7 @@ command_t* register_command(command_context_t *context, command_t *parent, char free((void *)full_name); /* we now need to add an overrideable proc */ - const char *override_name=alloc_printf("proc %s%s%s {args} {eval \"ocd_%s%s%s $args\";return \"\"}", t1, t2, t3, t1, t2, t3); + const char *override_name=alloc_printf("proc %s%s%s {args} {if {[catch {eval \"ocd_%s%s%s $args\"}]==0} {return \"\"} else { return -code error }", t1, t2, t3, t1, t2, t3); Jim_Eval(interp, override_name); free((void *)override_name); |