less weird error messages for unknown commands. Check if command exists before trying it.
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 18 May 2009 13:07:37 +0000 (13:07 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Mon, 18 May 2009 13:07:37 +0000 (13:07 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1810 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/helper/startup.tcl

index eb965e009d2fd74b2795044f882fcdcb2137ffb9..a6b50aa35b6224c885737f60c415d531dba2ef70 100644 (file)
@@ -88,9 +88,10 @@ proc unknown {args} {
        # do the name mangling from "flash banks" to "flash_banks"
        if {[llength $args]>=2} {
                set cmd_name "[lindex $args 0]_[lindex $args 1]"
-               # Fix?? add a check here if this is a command?
-               # we'll strip away args until we fail anyway...
-               return [eval "$cmd_name [lrange $args 2 end]"]
+               if {[catch {info body $cmd_name}]==0} {
+                   # the command exists, try it...
+                       return [eval "$cmd_name [lrange $args 2 end]"]
+               }
        }
        # This really is an unknown command.
        return -code error "Unknown command: $args"

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)