summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvImg.c
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2012-07-21 08:11:21 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2012-07-21 08:11:21 (GMT)
commit6c4410183fc1d8dd6ba26d2428abfd718850c246 (patch)
tree2155194029aa5ccfd6cdf90913ff12109c494add /generic/tkCanvImg.c
parent28d5754e102ceb55ec60fe998f47eb81cd8036c7 (diff)
downloadtk-6c4410183fc1d8dd6ba26d2428abfd718850c246.zip
tk-6c4410183fc1d8dd6ba26d2428abfd718850c246.tar.gz
tk-6c4410183fc1d8dd6ba26d2428abfd718850c246.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;