summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvArc.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)
commited7fb54396eee6e5122bfe611b2a14cf422970fa (patch)
tree2155194029aa5ccfd6cdf90913ff12109c494add /generic/tkCanvArc.c
parentf4db69f3300fe5cdb3da35c67bf608674950a72c (diff)
downloadtk-ed7fb54396eee6e5122bfe611b2a14cf422970fa.zip
tk-ed7fb54396eee6e5122bfe611b2a14cf422970fa.tar.gz
tk-ed7fb54396eee6e5122bfe611b2a14cf422970fa.tar.bz2
consistent error formatting, added error codes
Diffstat (limited to 'generic/tkCanvArc.c')
-rw-r--r--generic/tkCanvArc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/generic/tkCanvArc.c b/generic/tkCanvArc.c
index d8a8062..434ca66 100644
--- a/generic/tkCanvArc.c
+++ b/generic/tkCanvArc.c
@@ -359,6 +359,8 @@ ArcCoords(
} else if (objc != 4) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"wrong # coordinates: expected 4, got %d", objc));
+ Tcl_SetErrorCode(interp, "TK", "CANVAS", "COORDS", "ARC",
+ NULL);
return TCL_ERROR;
}
}
@@ -376,6 +378,7 @@ ArcCoords(
} else {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"wrong # coordinates: expected 0 or 4, got %d", objc));
+ Tcl_SetErrorCode(interp, "TK", "CANVAS", "COORDS", "ARC", NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -2013,8 +2016,10 @@ StyleParseProc(
return TCL_OK;
}
- Tcl_AppendResult(interp, "bad -style option \"", value,
- "\": must be arc, chord, or pieslice", NULL);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "bad -style option \"%s\": must be arc, chord, or pieslice",
+ value));
+ Tcl_SetErrorCode(interp, "TK", "CANVAS", "ARCSTYLE", NULL);
*stylePtr = PIESLICE_STYLE;
return TCL_ERROR;
}