diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2014-06-17 14:30:06 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2014-06-17 14:30:06 (GMT) |
commit | d27ff0c78862fc1652325b8c27e0882aa772171f (patch) | |
tree | 8f39f23145f82d7c131c79685ec6501399225d4d /generic/tclClock.c | |
parent | 946600db937b025964117d8aaa11a9e27f96e9aa (diff) | |
download | tcl-d27ff0c78862fc1652325b8c27e0882aa772171f.zip tcl-d27ff0c78862fc1652325b8c27e0882aa772171f.tar.gz tcl-d27ff0c78862fc1652325b8c27e0882aa772171f.tar.bz2 |
[f0f876c141] Improve consistency in error messages.
Diffstat (limited to 'generic/tclClock.c')
-rw-r--r-- | generic/tclClock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c index 15f29e5..7e917f6 100644 --- a/generic/tclClock.c +++ b/generic/tclClock.c @@ -1703,7 +1703,7 @@ ClockClicksObjCmd( case 1: break; case 2: - if (Tcl_GetIndexFromObj(interp, objv[1], clicksSwitches, "switch", 0, + if (Tcl_GetIndexFromObj(interp, objv[1], clicksSwitches, "option", 0, &index) != TCL_OK) { return TCL_ERROR; } @@ -1873,9 +1873,9 @@ ClockParseformatargsObjCmd( localeObj = litPtr[LIT_C]; timezoneObj = litPtr[LIT__NIL]; for (i = 2; i < objc; i+=2) { - if (Tcl_GetIndexFromObj(interp, objv[i], options, "switch", 0, + if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0, &optionIndex) != TCL_OK) { - Tcl_SetErrorCode(interp, "CLOCK", "badSwitch", + Tcl_SetErrorCode(interp, "CLOCK", "badOption", Tcl_GetString(objv[i]), NULL); return TCL_ERROR; } |