diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-30 09:16:18 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-30 09:16:18 (GMT) |
commit | d4a4017589dd52fa8e9667df9d754fd62abd6bed (patch) | |
tree | cd1c34c3bde890cd37b2dbe74d9234dd11ce7afb /generic | |
parent | 0bd347649db35a0b43e0a0ba3d443d4f1f9b3d2b (diff) | |
download | tk-d4a4017589dd52fa8e9667df9d754fd62abd6bed.zip tk-d4a4017589dd52fa8e9667df9d754fd62abd6bed.tar.gz tk-d4a4017589dd52fa8e9667df9d754fd62abd6bed.tar.bz2 |
more reorganization of error codes: safety is common failure mode
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; } |