diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-16 12:36:40 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-16 12:36:40 (GMT) |
commit | a96a4263f85fa276c74672a7e28251691f0c7680 (patch) | |
tree | 83188d92aa77a52a178e0ae85ba5439c402f4eca /generic/tkObj.c | |
parent | da1c30ff0d8a05251ef3ab0e9f6a5c5bae6f7b14 (diff) | |
download | tk-a96a4263f85fa276c74672a7e28251691f0c7680.zip tk-a96a4263f85fa276c74672a7e28251691f0c7680.tar.gz tk-a96a4263f85fa276c74672a7e28251691f0c7680.tar.bz2 |
Working towards adding all the Tcl_SetErrorCode calls that should be there.
** WORK IN PROGRESS **
Diffstat (limited to 'generic/tkObj.c')
-rw-r--r-- | generic/tkObj.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/tkObj.c b/generic/tkObj.c index 8877d42..29a235a 100644 --- a/generic/tkObj.c +++ b/generic/tkObj.c @@ -506,6 +506,7 @@ SetPixelFromAny( if (interp != NULL) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "bad screen distance \"%.50s\"", string)); + Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", NULL); } return TCL_ERROR; } @@ -736,6 +737,7 @@ SetMMFromAny( error: Tcl_AppendResult(interp, "bad screen distance \"", string, "\"", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "DISTANCE", NULL); return TCL_ERROR; } while ((*rest != '\0') && isspace(UCHAR(*rest))) { @@ -1036,6 +1038,7 @@ TkParsePadAmount( Tcl_AppendResult(interp, "bad pad value \"", Tcl_GetString(specObj), "\": must be positive screen distance", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "PADDING", "DIST", NULL); return TCL_ERROR; } secondInt = firstInt; @@ -1053,6 +1056,7 @@ TkParsePadAmount( if (objc != 1 && objc != 2) { Tcl_AppendResult(interp, "wrong number of parts to pad specification", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "PADDING", "PARTS", NULL); return TCL_ERROR; } @@ -1065,6 +1069,7 @@ TkParsePadAmount( Tcl_ResetResult(interp); Tcl_AppendResult(interp, "bad pad value \"", Tcl_GetString(objv[0]), "\": must be positive screen distance", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "PADDING", "DIST", NULL); return TCL_ERROR; } @@ -1081,6 +1086,7 @@ TkParsePadAmount( Tcl_AppendResult(interp, "bad 2nd pad value \"", Tcl_GetString(objv[1]), "\": must be positive screen distance", NULL); + Tcl_SetErrorCode(interp, "TK", "VALUE", "PADDING", "DIST", NULL); return TCL_ERROR; } |