Version 3 of Documenting Tcl's warning/error messages

Updated 2006-08-01 03:27:29 by lwv

Purpose: provide a launching point for explanations and suggestions for resolving warnings and errors generated by the base Tcl interpreter.

Similar pages for extensions can be started if this appears useful.

The following is an attempt to catalog the various warning messages that a user might find appearing when running Tcl applications. The purpose of this list is not to simply have a list. It is to provide a point where people can add more explanation as to what a particular warning or error means, along with suggestions for solving the situation. In some cases, the solution may be a change in the user's environment. In other cases, the message may indicate an error in the Tcl application. In a few cases, the messag may indicate a problem in Tcl itself.

 Binary:
        number of elements in list does not match count
        cannot use "*" in format string with "x"
        bad field specifier "{buffer}"
        not enough arguments for all format specifiers
        missing count for "@" field specifier
        expected {error1} but got "{error2}" instead

 Ckalloc:
        wrong # args: should be "{command} option [args..]"
        wrong # args: should be "{command} {arg1} file"
        wrong # args: should be "{command} active file"
        wrong # args: should be "{command} display file"
        error accessing {file}
        wrong # args: should be "{command} onexit file"
        wrong # args: should be "{command} tag string"
        bad option "{option}": should be active, break_on_malloc, info, init, onexit tag, trace, trace_on_at_malloc, or validate
        wrong # args: should be "{command} {arg} count"
        wrong # args: should be "{command} {arg} on|off"
        wrong # args: should be "{command} filename"

 CmdAH:
        couldn't change working directory to "{dirname}": {posixerror}
        could not create new link "{path}": that path already exists
        could not create new link "{path}" using target "{path2}" doesn't exist
        could not create new link "{path}" pointing to "{path2}": {posixerror}
        could not read link "{path}": {posixerror}
        could not readlink "{path}": {posixerror}
        could not read "{path}": {posixerror}

 CmdIL:
        wrong # args: no script following "{clause}" argument
        wrong # args: no script following "else" argument
        wrong # args: extra words after "else" clause in "if" command
        "{command}" isn't a procedure
        "{command}" isn't a procedure
        "{command}" isn't a procedure
        couldn't store default value in variable "{varname}"
        procedure "{command}" doesn't have an argument "{argname}"
        bad level "{level}"
        list doesn't contain element {element}
        missing starting index
        "-command" option must be followed by comparison command
        "-index" option must be followed by list index
        element {element} missing from sublist "{list}" must be a list
        -compare command returned non-numeric result

 CmdMZ:
        regexp match variables not allowed when using -inline
        couldn't set variable "{variable}"
        couldn't set variable "{variable}"
        extra switch pattern with no body
        extra switch pattern with no body, this may be due to a comment incorrectly placed outside of a switch body - see the "switch" documentation, or an "; # end switch" comment without the semi-colon.
        no body specified for pattern "{pattern}"
        bad operations "{flag}": should be one or more of rwua

 Encoding:
        invalid encoding file "{file}"
        unknown encoding "{encodingname}"

 LoadAout:
        bad magic number in intermediate file "{filename}"
        couldn't open "{fileName}" : {posixerror}
        File "{fileName}" is not a Tcl load module.
        Library directory in "{fileName}" ends prematurely.
        bad magic number in intermediate file "{filename}"
        error on intermediate file "{filename}": {posixerror}

 LoadDl:
        couldn't load file "{filename}": {dlerror}

 LoadDld:
        initialization failed for dynamic loader: {dlderror}
        couldn't load file "{filename}}: {dlderror}
        initialization failed for dynamic loader: {dlderror}
        couldn't load file "{filename}": {dlderror}

 LoadNext:
        couldn't load file "{fileName}": {memoryerr}

 LoadOSF:
        couldn't load file "{fileName}": {memoryerr}

 LoadShl:
        couldn't load file "{fileName}": {memoryerr}

 UnixChan: 
        -handshake RTSCTS not supported for this platform
        -handshake DTRDSR not supported for this platform
        -ttycontrol DTR not supported for this platform
        -ttycontrol RTS not supported for this platform
        -ttycontrol BREAK not supported for this platform
        bad value for -handshake: must be one of xonxoff, rtscts, dtrdsr or none
        bad value for -xchar: should be a list of two elements
        bad value for -ttycontrol: should be a list of signal,value pairs
        bad signal for -ttycontrol: must be DTR, RTS or BREAK
        bad value for -mode: should be baud,parity,data,stop
        bad value for -mode: parity: should be n, o, e, m, or s
        bad value for -mode: parity: should be n, o, or 3
        bad value for -mode: data: should be 5, 6, 7, or 8
        bad value for -mode: stop: should be 1 or 2
        couldn't open "{filename}": {posixerror}
        can't get peername: {posixerror}
        can't get sockname: {posixerror}
        couldn't open socket: {posixerror}
        couldn't open socket: {posixerror}
        "{channel}" wasn't opened for writing
        "{channel}" wasn't opened for reading
        cannot get a FILE * for "{channel}"
        "{channel}" cannot be used to get a FILE *

 UnixFCmd:
        could not read "{filename}": {posixerror}
        could not read "{filename}": {posixerror}
        could not read "{filename}": {posixerror}
        could not set group for file "{filename}": group "{groupname}" does not exist
        could not set group for file "{filename}": {posixerror}
        could not set owner for file "{filename}": user "{username}" does not exist
        could not set owner for file "{filename}": {posixerror}
        could not read "{filename}": {posixerror}

 UnixFile:
        couldn't read directory "{dirname}": {posixerror}
        error getting working directory name: {posixerror}

 UnixPipe:
        couldn't create pipe: {posixerror}
        couldn't fork child process: {posixerror}
        {errno}{posixerror}

 UnixTest:
        wrong # arguments: should be "{progname} option ... "
        bad index {pipenum}
        wrong # arguments: should be "{progname} clear index"
        wrong # arguments: should be "{progname} counts index"
        wrong # arguments: should be "{progname} create index readMode writeMode"
        couldn't open pipe: {posixerror}
        bad read mode "{readmode}"
        bad read mode "{readmode}"
        wrong # arguments: should be "{progname} empty index"
        wrong # arguments: should be "{progname} fill index" ??
        wrong # arguments: should be "{progname} fillpartial index" ??
        wrong # arguments: should be "{progname} wait index readable/writable timeout"
        pipe {pipename} doesn't exist
        readable
        writable
        bad option "{optionname}": must be close, clear, counts, create, empty, fill, fillpartial, oneevent, wait, or windowevent

        wrong # arguments: should be "{progname} file readable|writable|both timeout"
        bad argument "{argument}": must be readable, writable, or both
        readable
        writable
        wrong # arguments: should be "{command} argv0"
        wrong # args: should be "{command} channelName forWriting"
        Tcl_GetOpenFile succeeded but FILE * NULL!
        wrong # args: should be "{command} defaultDir"
        wrong # args: should be "{command} 
        {DefaultEncodingDir}
        sigaction: {posixerror"
        alarm: {posixerror"
        warning: sigaction SA_RESTART not support on this platformo
        "0"
        "1"

 XtTest:
        wrong # arguments: should be "{command} option ... "
        bad option "{option}": must be done or wait

Category Documentation Category Internals