acs::cmd_has_subcommand (private)

 acs::cmd_has_subcommand cmd subcommand

Defined in packages/acs-tcl/tcl/00-icanuse-procs.tcl

Helper proc abusing error messages to determine, whether as submethod is available, since there is in Tcl no generic way to determine subcommands for a command. Note: Use this with caution, this is NOT GUARANTEED to work with every command, since many commands require e.g. a connection or return different error messages. When using this in more cases, test first! Therefore, this is a PRIVATE function, not intenended for public use.

Parameters:
cmd
subcommand

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs__command_has_subcommand acs__command_has_subcommand (test acs-tcl) acs::cmd_has_subcommand acs::cmd_has_subcommand test_acs__command_has_subcommand->acs::cmd_has_subcommand

Testcases:
acs__command_has_subcommand
Source code:
        catch [list $cmd ""] errorMsg
        regsub ", or " $errorMsg ", " errorMsg
        regsub "^.*must be " $errorMsg " " errorMsg
        return [expr {$subcommand" in [split $errorMsg ","]}]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: