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 | f4db69f3300fe5cdb3da35c67bf608674950a72c (patch) | |
tree | 83188d92aa77a52a178e0ae85ba5439c402f4eca /generic/tkObj.c | |
parent | 8f22ecfac96ac10f3c1aa3df10a10071ed591d9b (diff) | |
download | tk-f4db69f3300fe5cdb3da35c67bf608674950a72c.zip tk-f4db69f3300fe5cdb3da35c67bf608674950a72c.tar.gz tk-f4db69f3300fe5cdb3da35c67bf608674950a72c.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; } |