summaryrefslogtreecommitdiffstats
path: root/generic/tkVisual.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-16 12:36:40 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-16 12:36:40 (GMT)
commitf4db69f3300fe5cdb3da35c67bf608674950a72c (patch)
tree83188d92aa77a52a178e0ae85ba5439c402f4eca /generic/tkVisual.c
parent8f22ecfac96ac10f3c1aa3df10a10071ed591d9b (diff)
downloadtk-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/tkVisual.c')
-rw-r--r--generic/tkVisual.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/generic/tkVisual.c b/generic/tkVisual.c
index 3602088..b19e78c 100644
--- a/generic/tkVisual.c
+++ b/generic/tkVisual.c
@@ -176,6 +176,7 @@ Tk_GetVisual(
Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "bad X identifier for visual: \"",
string, "\"", NULL);
+ Tcl_SetErrorCode(interp, "TK", "VALUE", "VISUALID", NULL);
return NULL;
}
template.visualid = visualId;
@@ -204,6 +205,7 @@ Tk_GetVisual(
if (template.class == -1) {
Tcl_AppendResult(interp, "unknown or ambiguous visual name \"",
string, "\": class must be ", NULL);
+ Tcl_SetErrorCode(interp, "TK", "VALUE", "VISUAL", NULL);
for (dictPtr = visualNames; dictPtr->name != NULL; dictPtr++) {
Tcl_AppendResult(interp, dictPtr->name, ", ", NULL);
}
@@ -239,6 +241,7 @@ Tk_GetVisual(
if (visInfoList == NULL) {
Tcl_SetResult(interp, "couldn't find an appropriate visual",
TCL_STATIC);
+ Tcl_SetErrorCode(interp, "TK", "VISUAL", "INAPPROPRIATE", NULL);
return NULL;
}
@@ -405,11 +408,13 @@ Tk_GetColormap(
if (Tk_Screen(other) != Tk_Screen(tkwin)) {
Tcl_AppendResult(interp, "can't use colormap for ", string,
": not on same screen", NULL);
+ Tcl_SetErrorCode(interp, "TK", "COLORMAP", "SCREEN", NULL);
return None;
}
if (Tk_Visual(other) != Tk_Visual(tkwin)) {
Tcl_AppendResult(interp, "can't use colormap for ", string,
": incompatible visuals", NULL);
+ Tcl_SetErrorCode(interp, "TK", "COLORMAP", "INCOMPATIBLE", NULL);
return None;
}
colormap = Tk_Colormap(other);