diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-04-04 20:07:09 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-04-04 20:07:09 (GMT) |
commit | 01361668457830c504cc69e5f90269188565a087 (patch) | |
tree | 165e51f694935f991e7533b27ac3cb6875cc94ed /generic/tclCmdAH.c | |
parent | 4b1cba38335c4b57657a9df43afc2c11ad9ffc55 (diff) | |
download | tcl-01361668457830c504cc69e5f90269188565a087.zip tcl-01361668457830c504cc69e5f90269188565a087.tar.gz tcl-01361668457830c504cc69e5f90269188565a087.tar.bz2 |
More generation of error codes (miscellaneous commands mostly already handled).
Diffstat (limited to 'generic/tclCmdAH.c')
-rw-r--r-- | generic/tclCmdAH.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 8b5f13d..765c9dc 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -641,6 +641,8 @@ EncodingDirsObjCmd( if (Tcl_SetEncodingSearchPath(objv[1]) == TCL_ERROR) { Tcl_AppendResult(interp, "expected directory list but got \"", TclGetString(objv[1]), "\"", NULL); + Tcl_SetErrorCode(interp, "TCL", "OPERATION", "ENCODING", "BADPATH", + NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, objv[1]); @@ -1782,6 +1784,8 @@ PathFilesystemCmd( fsInfo = Tcl_FSFileSystemInfo(objv[1]); if (fsInfo == NULL) { Tcl_SetResult(interp, "unrecognised path", TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "FILESYSTEM", + Tcl_GetString(objv[1]), NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, fsInfo); @@ -1933,6 +1937,8 @@ PathSplitCmd( if (res == NULL) { Tcl_AppendResult(interp, "could not read \"", TclGetString(objv[1]), "\": no such file or directory", NULL); + Tcl_SetErrorCode(interp, "TCL", "OPERATION", "PATHSPLIT", "NONESUCH", + NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, res); @@ -2032,6 +2038,8 @@ FilesystemSeparatorCmd( if (separatorObj == NULL) { Tcl_SetResult(interp, "unrecognised path", TCL_STATIC); + Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "FILESYSTEM", + Tcl_GetString(objv[1]), NULL); return TCL_ERROR; } Tcl_SetObjResult(interp, separatorObj); @@ -2586,6 +2594,8 @@ TclNRForeachCmd( &statePtr->varcList[i], &statePtr->varvList[i]); if (statePtr->varcList[i] < 1) { Tcl_AppendResult(interp, "foreach varlist is empty", NULL); + Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FOREACH", + "NEEDVARS", NULL); result = TCL_ERROR; goto done; } |