summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvImg.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-21 08:11:21 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-21 08:11:21 (GMT)
commit7c4fea3383697638df3c0d27196fc5ba61591ad7 (patch)
tree2155194029aa5ccfd6cdf90913ff12109c494add /generic/tkCanvImg.c
parenta96a4263f85fa276c74672a7e28251691f0c7680 (diff)
downloadtk-7c4fea3383697638df3c0d27196fc5ba61591ad7.zip
tk-7c4fea3383697638df3c0d27196fc5ba61591ad7.tar.gz
tk-7c4fea3383697638df3c0d27196fc5ba61591ad7.tar.bz2
consistent error formatting, added error codes
Diffstat (limited to 'generic/tkCanvImg.c')
-rw-r--r--generic/tkCanvImg.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c
index b92659b..172f26d 100644
--- a/generic/tkCanvImg.c
+++ b/generic/tkCanvImg.c
@@ -245,10 +245,13 @@ ImageCoords(
} else if (objc != 2) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"wrong # coordinates: expected 2, got %d", objc));
+ Tcl_SetErrorCode(interp, "TK", "CANVAS", "COORDS", "IMAGE",
+ NULL);
return TCL_ERROR;
}
}
- if ((Tk_CanvasGetCoordFromObj(interp, canvas, objv[0], &imgPtr->x) != TCL_OK)
+ if ((Tk_CanvasGetCoordFromObj(interp, canvas, objv[0],
+ &imgPtr->x) != TCL_OK)
|| (Tk_CanvasGetCoordFromObj(interp, canvas, objv[1],
&imgPtr->y) != TCL_OK)) {
return TCL_ERROR;
@@ -257,6 +260,7 @@ ImageCoords(
} else {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"wrong # coordinates: expected 0 or 2, got %d", objc));
+ Tcl_SetErrorCode(interp, "TK", "CANVAS", "COORDS", "IMAGE", NULL);
return TCL_ERROR;
}
return TCL_OK;