]> git.sur5r.net Git - openocd/commitdiff
fix error output a bit: do not repeat output printed during execution in case of...
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 11 Aug 2008 10:30:36 +0000 (10:30 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 11 Aug 2008 10:30:36 +0000 (10:30 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@905 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/helper/command.c

index 7dc62dd554f95a4eb229b13bfe21a8c9b1fa166e..7ce7c2245d94768065f4d63470a5f932ef34cdc5 100644 (file)
@@ -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);