diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-21 08:11:21 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-21 08:11:21 (GMT) |
commit | ed7fb54396eee6e5122bfe611b2a14cf422970fa (patch) | |
tree | 2155194029aa5ccfd6cdf90913ff12109c494add /generic/tkCanvBmap.c | |
parent | f4db69f3300fe5cdb3da35c67bf608674950a72c (diff) | |
download | tk-ed7fb54396eee6e5122bfe611b2a14cf422970fa.zip tk-ed7fb54396eee6e5122bfe611b2a14cf422970fa.tar.gz tk-ed7fb54396eee6e5122bfe611b2a14cf422970fa.tar.bz2 |
consistent error formatting, added error codes
Diffstat (limited to 'generic/tkCanvBmap.c')
-rw-r--r-- | generic/tkCanvBmap.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tkCanvBmap.c b/generic/tkCanvBmap.c index adaa184..bf4c78f 100644 --- a/generic/tkCanvBmap.c +++ b/generic/tkCanvBmap.c @@ -260,6 +260,8 @@ BitmapCoords( } else if (objc != 2) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "wrong # coordinates: expected 2, got %d", objc)); + Tcl_SetErrorCode(interp, "TK", "CANVAS", "COORDS", "BITMAP", + NULL); return TCL_ERROR; } } @@ -273,6 +275,7 @@ BitmapCoords( } else { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "wrong # coordinates: expected 0 or 2, got %d", objc)); + Tcl_SetErrorCode(interp, "TK", "CANVAS", "COORDS", "BITMAP", NULL); return TCL_ERROR; } return TCL_OK; @@ -934,8 +937,9 @@ BitmapToPostscript( } if (width > 60000) { Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "can't generate Postscript", - " for bitmaps more than 60000 pixels wide", NULL); + Tcl_SetResult(interp, "can't generate Postscript for bitmaps more" + " than 60000 pixels wide", TCL_STATIC); + Tcl_SetErrorCode(interp, "TK", "CANVAS", "PS", "MEMLIMIT", NULL); return TCL_ERROR; } rowsAtOnce = 60000/width; |