Posted to tcl by kostix at Tue May 27 22:58:44 GMT 2008view raw
- proc printerror {script} {
- uplevel 1 "if \{\[set code \[catch \{$script\} _msg\]\] == 1\} \{ puts -nonewline stderr \$_msg ; return -code error \} \{set \$_msg\}"
- }
- test ldap-2.0 {check info ip subcommand error handling
- } -body {
- printerror {ldap::info ip}
- } -returnCodes {error} \
- -errorOutput {Wrong # of arguments. Usage: ldap::info ip handle}