summaryrefslogtreecommitdiffstats
path: root/generic/tkGet.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-01-23 20:46:58 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-01-23 20:46:58 (GMT)
commit03582e574085bb1a722ddb42239db6116db7c66a (patch)
treeb2acac1728a6dceb22148fb10c31e9f54749bad0 /generic/tkGet.c
parentd1e742a7b7a9b4754993a7f19e61ecc674d14fa2 (diff)
downloadtk-03582e574085bb1a722ddb42239db6116db7c66a.zip
tk-03582e574085bb1a722ddb42239db6116db7c66a.tar.gz
tk-03582e574085bb1a722ddb42239db6116db7c66a.tar.bz2
Revise "bad screen distance" error-messages
Diffstat (limited to 'generic/tkGet.c')
-rw-r--r--generic/tkGet.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/generic/tkGet.c b/generic/tkGet.c
index 2b0e7ee..f96b566 100644
--- a/generic/tkGet.c
+++ b/generic/tkGet.c
@@ -601,7 +601,7 @@ Tk_GetScreenMM(
error:
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "bad screen distance \"%s\"", string));
+ "expected screen distance but got \"%s\"", string));
Tcl_SetErrorCode(interp, "TK", "VALUE", "SCREEN_DISTANCE", NULL);
}
return TCL_ERROR;
@@ -713,8 +713,9 @@ TkGetDoublePixels(
}
if (!tkwin) {
if (interp != NULL) {
- Tcl_SetObjResult(interp, Tcl_NewStringObj("bad screen", -1));
- Tcl_SetErrorCode(interp, "TK", "VALUE", "FRACTIONAL_PIXELS", NULL);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "expected screen distance but got \"%s\"", string));
+ Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", NULL);
}
return TCL_ERROR;
}
@@ -729,7 +730,7 @@ TkGetDoublePixels(
error:
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "bad screen distance \"%s\"", string));
+ "expected screen distance but got \"%s\"", string));
Tcl_SetErrorCode(interp, "TK", "VALUE", "FRACTIONAL_PIXELS", NULL);
}
return TCL_ERROR;