diff options
author | dkf <dkf@noemail.net> | 2012-07-30 09:16:18 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2012-07-30 09:16:18 (GMT) |
commit | f13e064cb63e9f0f191027737a0828049522456f (patch) | |
tree | cd1c34c3bde890cd37b2dbe74d9234dd11ce7afb /generic | |
parent | f6cd9146176b69fed2601313e2c7b30447b1aac4 (diff) | |
download | tk-f13e064cb63e9f0f191027737a0828049522456f.zip tk-f13e064cb63e9f0f191027737a0828049522456f.tar.gz tk-f13e064cb63e9f0f191027737a0828049522456f.tar.bz2 |
more reorganization of error codes: safety is common failure mode
FossilOrigin-Name: 5058af7c9a91e1d51c12121b7773b3ff31205a81
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkCanvPs.c | 2 | ||||
-rw-r--r-- | generic/tkCmds.c | 8 | ||||
-rw-r--r-- | generic/tkImgBmap.c | 2 | ||||
-rw-r--r-- | generic/tkImgPhoto.c | 6 | ||||
-rw-r--r-- | generic/tkOption.c | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c index b6e9a33..fb5172e 100644 --- a/generic/tkCanvPs.c +++ b/generic/tkCanvPs.c @@ -357,7 +357,7 @@ TkCanvPostscriptCmd( if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't specify -file in a safe interpreter", -1)); - Tcl_SetErrorCode(interp, "TK", "CANVAS", "PS", "SAFE", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "PS_FILE", NULL); result = TCL_ERROR; goto cleanup; } diff --git a/generic/tkCmds.c b/generic/tkCmds.c index 2955105..4e9494b 100644 --- a/generic/tkCmds.c +++ b/generic/tkCmds.c @@ -687,7 +687,7 @@ AppnameCmd( if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "appname not accessible in a safe interpreter", -1)); - Tcl_SetErrorCode(interp, "TK", "SAFE", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "APPLICATION", NULL); return TCL_ERROR; } @@ -812,7 +812,7 @@ ScalingCmd( if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "scaling not accessible in a safe interpreter", -1)); - Tcl_SetErrorCode(interp, "TK", "SAFE", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "SCALING", NULL); return TCL_ERROR; } @@ -862,7 +862,7 @@ UseinputmethodsCmd( if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "useinputmethods not accessible in a safe interpreter", -1)); - Tcl_SetErrorCode(interp, "TK", "SAFE", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "INPUT_METHODS", NULL); return TCL_ERROR; } @@ -959,7 +959,7 @@ InactiveCmd( Tcl_SetObjResult(interp, Tcl_NewStringObj( "resetting the user inactivity timer " "is not allowed in a safe interpreter", -1)); - Tcl_SetErrorCode(interp, "TK", "SAFE", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "INACTIVITY_TIMER", NULL); return TCL_ERROR; } Tk_ResetUserInactiveTime(Tk_Display(tkwin)); diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c index f57db55..cdd57dd 100644 --- a/generic/tkImgBmap.c +++ b/generic/tkImgBmap.c @@ -497,7 +497,7 @@ TkGetBitmapData( Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't get bitmap data from a file in a safe interpreter", -1)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "BITMAP", "SAFE", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "BITMAP_FILE", NULL); return NULL; } expandedFileName = Tcl_TranslateFileName(interp, fileName, &buffer); diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 74ee564..559268a 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -1011,7 +1011,7 @@ ImgPhotoCmd( if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't get image from a file in a safe interpreter", -1)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "SAFE", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "PHOTO_FILE", NULL); return TCL_ERROR; } @@ -1274,7 +1274,7 @@ ImgPhotoCmd( if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't write image to a file in a safe interpreter", -1)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "SAFE", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "PHOTO_FILE", NULL); return TCL_ERROR; } @@ -1898,7 +1898,7 @@ ImgPhotoConfigureMaster( Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't get image from a file in a safe interpreter", -1)); - Tcl_SetErrorCode(interp, "TK", "IMAGE", "PHOTO", "SAFE", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "PHOTO_FILE", NULL); goto errorExit; } diff --git a/generic/tkOption.c b/generic/tkOption.c index 24f7e39..ec9e465 100644 --- a/generic/tkOption.c +++ b/generic/tkOption.c @@ -1081,7 +1081,7 @@ ReadOptionFile( if (Tcl_IsSafe(interp)) { Tcl_SetObjResult(interp, Tcl_NewStringObj( "can't read options from a file in a safe interpreter", -1)); - Tcl_SetErrorCode(interp, "TK", "OPTIONDB", "SAFE", NULL); + Tcl_SetErrorCode(interp, "TK", "SAFE", "OPTION_FILE", NULL); return TCL_ERROR; } |