summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-08-15 20:44:42 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-08-15 20:44:42 (GMT)
commite2b7aacde0b54ede80212fed9a78769e97cfad9a (patch)
tree18b7d7b323f17ccdb5624da38b4ae2ec0f9767c5
parentbc5ad3cf65f93eea249301f61a37cefaafa8c410 (diff)
parent64d7cb80a01248468fed1f40a6eda03c71e126fd (diff)
downloadtcl-e2b7aacde0b54ede80212fed9a78769e97cfad9a.zip
tcl-e2b7aacde0b54ede80212fed9a78769e97cfad9a.tar.gz
tcl-e2b7aacde0b54ede80212fed9a78769e97cfad9a.tar.bz2
Improve bunch of error-messages
-rw-r--r--generic/rege_dfa.c2
-rw-r--r--generic/regerrs.h4
-rw-r--r--generic/tclBasic.c2
-rw-r--r--generic/tclInterp.c2
-rw-r--r--generic/tclLoad.c6
-rw-r--r--generic/tclRegexp.c2
-rw-r--r--generic/tclTest.c2
-rw-r--r--generic/tclThreadTest.c2
-rw-r--r--macosx/tclMacOSXNotify.c2
-rw-r--r--tests/load.test6
-rw-r--r--tests/lsearch.test2
-rw-r--r--tests/reg.test2
-rw-r--r--tests/regexp.test10
-rw-r--r--tests/regexpComp.test8
-rw-r--r--tests/safe.test8
-rw-r--r--tests/switch.test2
-rw-r--r--tools/regexpTestLib.tcl2
-rw-r--r--unix/tclLoadAix.c4
-rw-r--r--unix/tclLoadDyld.c2
-rw-r--r--unix/tclUnixTest.c2
20 files changed, 36 insertions, 36 deletions
diff --git a/generic/rege_dfa.c b/generic/rege_dfa.c
index c8c74f0..9602a71 100644
--- a/generic/rege_dfa.c
+++ b/generic/rege_dfa.c
@@ -791,7 +791,7 @@ pickNextSS(
* Nobody's old enough?!? -- something's really wrong.
*/
- FDEBUG(("can't find victim to replace!\n"));
+ FDEBUG(("cannot find victim to replace!\n"));
assert(NOTREACHED);
ERR(REG_ASSERT);
return d->ssets;
diff --git a/generic/regerrs.h b/generic/regerrs.h
index ee203d5..8e82a89 100644
--- a/generic/regerrs.h
+++ b/generic/regerrs.h
@@ -11,8 +11,8 @@
{ REG_BADBR, "REG_BADBR", "invalid repetition count(s)" },
{ REG_ERANGE, "REG_ERANGE", "invalid character range" },
{ REG_ESPACE, "REG_ESPACE", "out of memory" },
-{ REG_BADRPT, "REG_BADRPT", "quantifier operand invalid" },
-{ REG_ASSERT, "REG_ASSERT", "\"can't happen\" -- you found a bug" },
+{ REG_BADRPT, "REG_BADRPT", "invalid quantifier operand" },
+{ REG_ASSERT, "REG_ASSERT", "\"cannot happen\" -- you found a bug" },
{ REG_INVARG, "REG_INVARG", "invalid argument to regex function" },
{ REG_MIXED, "REG_MIXED", "character widths of regex and string differ" },
{ REG_BADOPT, "REG_BADOPT", "invalid embedded option" },
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index d120d5b..f971080 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -1249,7 +1249,7 @@ Tcl_CreateInterp(void)
nsPtr = Tcl_CreateNamespace(interp, "::tcl::mathop", NULL, NULL);
if (nsPtr == NULL) {
- Tcl_Panic("can't create math operator namespace");
+ Tcl_Panic("cannot create math operator namespace");
}
Tcl_Export(interp, nsPtr, "*", 1);
#define MATH_OP_PREFIX_LEN 15 /* == strlen("::tcl::mathop::") */
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index 6cc897e..48926ce 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -458,7 +458,7 @@ Tcl_Init(
" }\n"
" }\n"
" unset -nocomplain tclDefaultLibrary\n"
-" set msg \"Can't find a usable init.tcl in the following directories: \n\"\n"
+" set msg \"Cannot find a usable init.tcl in the following directories: \n\"\n"
" append msg \" $dirs\n\n\"\n"
" append msg \"$errors\n\n\"\n"
" append msg \"This probably means that Tcl wasn't installed properly.\n\"\n"
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index 37d75d3..dd4d470 100644
--- a/generic/tclLoad.c
+++ b/generic/tclLoad.c
@@ -355,7 +355,7 @@ Tcl_LoadObjCmd(
if (p == pkgGuess) {
Tcl_DecrRefCount(splitPtr);
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "couldn't figure out prefix for %s",
+ "cannot figure out prefix for %s",
fullFileName));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD",
"WHATLIBRARY", (char *)NULL);
@@ -452,7 +452,7 @@ Tcl_LoadObjCmd(
if (Tcl_IsSafe(target)) {
if (libraryPtr->safeInitProc == NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "can't use library in a safe interpreter: no"
+ "cannot use library in a safe interpreter: no"
" %s_SafeInit procedure", libraryPtr->prefix));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", "UNSAFE",
(char *)NULL);
@@ -463,7 +463,7 @@ Tcl_LoadObjCmd(
} else {
if (libraryPtr->initProc == NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "can't attach library to interpreter: no %s_Init procedure",
+ "cannot attach library to interpreter: no %s_Init procedure",
libraryPtr->prefix));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", "ENTRYPOINT",
(char *)NULL);
diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c
index caf6461..b1467cc 100644
--- a/generic/tclRegexp.c
+++ b/generic/tclRegexp.c
@@ -946,7 +946,7 @@ CompileRegexp(
Tcl_Free(regexpPtr);
if (interp) {
TclRegError(interp,
- "couldn't compile regular expression pattern: ", status);
+ "cannot compile regular expression pattern: ", status);
}
return NULL;
}
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 3b08cd6..9a7fa39 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -936,7 +936,7 @@ TestasyncCmd(
if (Tcl_CreateThread(&threadID, AsyncThreadProc,
INT2PTR(id), TCL_THREAD_STACK_DEFAULT,
TCL_THREAD_NOFLAGS) != TCL_OK) {
- Tcl_AppendResult(interp, "can't create thread", (char *)NULL);
+ Tcl_AppendResult(interp, "cannot create thread", (char *)NULL);
Tcl_MutexUnlock(&asyncTestMutex);
return TCL_ERROR;
}
diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c
index 49d9cf2..b34df65 100644
--- a/generic/tclThreadTest.c
+++ b/generic/tclThreadTest.c
@@ -509,7 +509,7 @@ ThreadCreate(
if (Tcl_CreateThread(&id, NewTestThread, &ctrl,
TCL_THREAD_STACK_DEFAULT, joinable) != TCL_OK) {
Tcl_MutexUnlock(&threadMutex);
- Tcl_AppendResult(interp, "can't create a new thread", (char *)NULL);
+ Tcl_AppendResult(interp, "cannot create a new thread", (char *)NULL);
return TCL_ERROR;
}
diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c
index f7a2324..2a678c3 100644
--- a/macosx/tclMacOSXNotify.c
+++ b/macosx/tclMacOSXNotify.c
@@ -1776,7 +1776,7 @@ TclUnixWaitForFile(
*/
if (fd >= FD_SETSIZE) {
- Tcl_Panic("TclUnixWaitForFile can't handle file id %d", fd);
+ Tcl_Panic("TclUnixWaitForFile cannot handle file id %d", fd);
/* must never get here, or select masks overrun will occur below */
}
#endif
diff --git a/tests/load.test b/tests/load.test
index 77a6dec..f2505c6 100644
--- a/tests/load.test
+++ b/tests/load.test
@@ -68,7 +68,7 @@ test load-1.7 {basic errors} -returnCodes error -body {
} -result {bad option "-abc": must be -global, -lazy, or --}
test load-1.8 {basic errors} -returnCodes error -body {
load -global
-} -result {couldn't figure out prefix for -global}
+} -result {cannot figure out prefix for -global}
test load-2.1 {basic loading, with guess for package name} \
[list $dll $loaded] {
@@ -90,7 +90,7 @@ test load-2.3 {loading with no _Init procedure} -constraints [list $dll $loaded]
{TCL LOOKUP LOAD_SYMBOL *Foo_Init}]
test load-2.4 {loading with no _SafeInit procedure} [list $dll $loaded] {
list [catch {load [file join $testDir tcl9pkga$ext] {} child} msg] $msg
-} {1 {can't use library in a safe interpreter: no Pkga_SafeInit procedure}}
+} {1 {cannot use library in a safe interpreter: no Pkga_SafeInit procedure}}
test load-3.1 {error in _Init procedure, same interpreter} \
[list $dll $loaded] {
@@ -164,7 +164,7 @@ test load-7.2 {Tcl_StaticLibrary procedure} [list teststaticlibrary] {
child eval {set x "not loaded"}
list [catch {load {} Another child} msg] $msg \
[child eval set x] [set x]
-} {1 {can't use library in a safe interpreter: no Another_SafeInit procedure} {not loaded} loaded}
+} {1 {cannot use library in a safe interpreter: no Another_SafeInit procedure} {not loaded} loaded}
test load-7.3 {Tcl_StaticLibrary procedure} [list teststaticlibrary] {
set x "not loaded"
teststaticlibrary More 0 1
diff --git a/tests/lsearch.test b/tests/lsearch.test
index b8a8aa7..4b1c04e 100644
--- a/tests/lsearch.test
+++ b/tests/lsearch.test
@@ -47,7 +47,7 @@ test lsearch-2.5 {search modes} {
} 1
test lsearch-2.6 {search modes} -returnCodes error -body {
lsearch -regexp {xyz bbcc *bc*} *bc*
-} -result {couldn't compile regular expression pattern: quantifier operand invalid}
+} -result {cannot compile regular expression pattern: invalid quantifier operand}
test lsearch-2.7 {search modes} {
lsearch -regexp {b.x ^bc xy bcx} ^bc
} 3
diff --git a/tests/reg.test b/tests/reg.test
index 67973ea..471adba 100644
--- a/tests/reg.test
+++ b/tests/reg.test
@@ -339,7 +339,7 @@ namespace import RETest::*
# test the code->message expansion at least once.
::tcltest::test reg-0.1 "regexp error reporting" {
list [catch {regexp (*) ign} msg] $msg
-} {1 {couldn't compile regular expression pattern: quantifier operand invalid}}
+} {1 {cannot compile regular expression pattern: invalid quantifier operand}}
doing 1 "basic sanity checks"
diff --git a/tests/regexp.test b/tests/regexp.test
index b06c163..4595b7c 100644
--- a/tests/regexp.test
+++ b/tests/regexp.test
@@ -275,10 +275,10 @@ test regexp-6.3 {regexp errors} {
} {1 {bad option "-gorp": must be -all, -about, -indices, -inline, -expanded, -line, -linestop, -lineanchor, -nocase, -start, or --}}
test regexp-6.4 {regexp errors} {
list [catch {regexp a( b} msg] $msg
-} {1 {couldn't compile regular expression pattern: parentheses () not balanced}}
+} {1 {cannot compile regular expression pattern: parentheses () not balanced}}
test regexp-6.5 {regexp errors} {
list [catch {regexp a( b} msg] $msg
-} {1 {couldn't compile regular expression pattern: parentheses () not balanced}}
+} {1 {cannot compile regular expression pattern: parentheses () not balanced}}
test regexp-6.6 {regexp errors} {
list [catch {regexp a a f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1} msg] $msg
} {0 1}
@@ -296,7 +296,7 @@ test regexp-6.9 {regexp errors, -start bad int check} {
} {1 {bad index "bogus": must be integer?[+-]integer? or end?[+-]integer?}}
test regexp-6.10 {regexp errors} {
list [catch {regexp {a[} b} msg] $msg
-} {1 {couldn't compile regular expression pattern: brackets [] not balanced}}
+} {1 {cannot compile regular expression pattern: brackets [] not balanced}}
test regexp-7.1 {basic regsub operation} {
list [regsub aa+ xaxaaaxaa 111&222 foo] $foo
@@ -481,7 +481,7 @@ test regexp-11.5 {regsub errors} {
} {1 {bad option "-gorp": must be -all, -command, -expanded, -line, -linestop, -lineanchor, -nocase, -start, or --}}
test regexp-11.6 {regsub errors} {
list [catch {regsub -nocase a( b c d} msg] $msg
-} {1 {couldn't compile regular expression pattern: parentheses () not balanced}}
+} {1 {cannot compile regular expression pattern: parentheses () not balanced}}
test regexp-11.7 {regsub errors} -setup {
unset -nocomplain f1
} -body {
@@ -889,7 +889,7 @@ test regexp-22.4 {Bug 3606139} -setup {
[a 668]([a 55])[a 668]([a 55])[a 668]([a 55])[a 511]] {}] a
} -cleanup {
rename a {}
-} -returnCodes 1 -match glob -result {couldn't compile regular expression pattern: *}
+} -returnCodes 1 -match glob -result {cannot compile regular expression pattern: *}
test regexp-22.5 {Bug 3610026} -setup {
set e {}
set cp 99
diff --git a/tests/regexpComp.test b/tests/regexpComp.test
index 6cf95b5..41be002 100644
--- a/tests/regexpComp.test
+++ b/tests/regexpComp.test
@@ -331,12 +331,12 @@ test regexpComp-6.4 {regexp errors} {
evalInProc {
list [catch {regexp a( b} msg] $msg
}
-} {1 {couldn't compile regular expression pattern: parentheses () not balanced}}
+} {1 {cannot compile regular expression pattern: parentheses () not balanced}}
test regexpComp-6.5 {regexp errors} {
evalInProc {
list [catch {regexp a( b} msg] $msg
}
-} {1 {couldn't compile regular expression pattern: parentheses () not balanced}}
+} {1 {cannot compile regular expression pattern: parentheses () not balanced}}
test regexpComp-6.6 {regexp errors} {
evalInProc {
list [catch {regexp a a f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1 f1} msg] $msg
@@ -592,7 +592,7 @@ test regexpComp-11.6 {regsub errors} {
evalInProc {
list [catch {regsub -nocase a( b c d} msg] $msg
}
-} {1 {couldn't compile regular expression pattern: parentheses () not balanced}}
+} {1 {cannot compile regular expression pattern: parentheses () not balanced}}
test regexpComp-11.7 {regsub errors} {
evalInProc {
unset -nocomplain f1
@@ -970,7 +970,7 @@ test regexpComp-24.9 {regexp command compiling tests} {
set re "("
list [catch {regexp -- $re dogfod} msg] $msg
}
-} {1 {couldn't compile regular expression pattern: parentheses () not balanced}}
+} {1 {cannot compile regular expression pattern: parentheses () not balanced}}
test regexpComp-24.10 {regexp command compiling tests} {
# Bug 1902436 - last * escaped
evalInProc {
diff --git a/tests/safe.test b/tests/safe.test
index 8af6c24..d163253 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -1370,7 +1370,7 @@ test safe-10.1 {testing statics loading} -constraints tcl::test -setup {
interp eval $i {load {} Safepfx1}
} -returnCodes error -cleanup {
safe::interpDelete $i
-} -result {load of library for prefix Safepfx1 failed: can't use library in a safe interpreter: no Safepfx1_SafeInit procedure}
+} -result {load of library for prefix Safepfx1 failed: cannot use library in a safe interpreter: no Safepfx1_SafeInit procedure}
test safe-10.1.1 {testing statics loading} -constraints tcl::test -setup {
set i [safe::interpCreate]
} -body {
@@ -1379,7 +1379,7 @@ test safe-10.1.1 {testing statics loading} -constraints tcl::test -setup {
} -cleanup {
unset -nocomplain m o
safe::interpDelete $i
-} -result {load of library for prefix Safepfx1 failed: can't use library in a safe interpreter: no Safepfx1_SafeInit procedure
+} -result {load of library for prefix Safepfx1 failed: cannot use library in a safe interpreter: no Safepfx1_SafeInit procedure
invoked from within
"load {} Safepfx1"
invoked from within
@@ -1402,7 +1402,7 @@ test safe-10.4 {testing nested statics loading / -nestedloadok} -constraints tcl
interp eval $i {interp create x; load {} Safepfx1 x}
} -returnCodes error -cleanup {
safe::interpDelete $i
-} -result {load of library for prefix Safepfx1 failed: can't use library in a safe interpreter: no Safepfx1_SafeInit procedure}
+} -result {load of library for prefix Safepfx1 failed: cannot use library in a safe interpreter: no Safepfx1_SafeInit procedure}
test safe-10.4.1 {testing nested statics loading / -nestedloadok} -constraints tcl::test -body {
set i [safe::interpCreate -nestedloadok]
catch {interp eval $i {interp create x; load {} Safepfx1 x}} m o
@@ -1410,7 +1410,7 @@ test safe-10.4.1 {testing nested statics loading / -nestedloadok} -constraints t
} -cleanup {
unset -nocomplain m o
safe::interpDelete $i
-} -result {load of library for prefix Safepfx1 failed: can't use library in a safe interpreter: no Safepfx1_SafeInit procedure
+} -result {load of library for prefix Safepfx1 failed: cannot use library in a safe interpreter: no Safepfx1_SafeInit procedure
invoked from within
"load {} Safepfx1 x"
invoked from within
diff --git a/tests/switch.test b/tests/switch.test
index 3d106c0..930f062 100644
--- a/tests/switch.test
+++ b/tests/switch.test
@@ -192,7 +192,7 @@ test switch-5.1 {errors in -regexp matching} -returnCodes error -body {
aaaab {subst exact}
default {subst none}
}
-} -result {couldn't compile regular expression pattern: quantifier operand invalid}
+} -result {cannot compile regular expression pattern: invalid quantifier operand}
test switch-6.1 {backslashes in patterns} {
switch -exact {\a\$\.\[} {
diff --git a/tools/regexpTestLib.tcl b/tools/regexpTestLib.tcl
index c5c156e..0941caf 100644
--- a/tools/regexpTestLib.tcl
+++ b/tools/regexpTestLib.tcl
@@ -56,7 +56,7 @@ proc removeAts {ls} {
proc convertErrCode {code} {
- set errMsg "couldn't compile regular expression pattern:"
+ set errMsg "cannot compile regular expression pattern:"
if {[string compare $code "INVARG"] == 0} {
return "$errMsg invalid argument to regex routine"
diff --git a/unix/tclLoadAix.c b/unix/tclLoadAix.c
index 2f6b6d4..527d35d 100644
--- a/unix/tclLoadAix.c
+++ b/unix/tclLoadAix.c
@@ -253,11 +253,11 @@ caterr(
strcat(errbuf, "to many errors");
break;
case L_ERROR_NOLIB:
- strcat(errbuf, "can't load library");
+ strcat(errbuf, "cannot load library");
strcat(errbuf, p);
break;
case L_ERROR_UNDEF:
- strcat(errbuf, "can't find symbol");
+ strcat(errbuf, "cannot find symbol");
strcat(errbuf, p);
break;
case L_ERROR_RLDBAD:
diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c
index 5b1062e..2fdfabe 100644
--- a/unix/tclLoadDyld.c
+++ b/unix/tclLoadDyld.c
@@ -118,7 +118,7 @@ DyldOFIErrorMsg(
case NSObjectFileImageFormat:
return "bad object file format";
case NSObjectFileImageAccess:
- return "can't read object file";
+ return "cannot read object file";
default:
return "unknown error";
}
diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c
index 26c590d..4d95309 100644
--- a/unix/tclUnixTest.c
+++ b/unix/tclUnixTest.c
@@ -209,7 +209,7 @@ TestfilehandlerCmd(
fcntl(GetFd(pipePtr->readFile), F_SETFL, O_NONBLOCK);
fcntl(GetFd(pipePtr->writeFile), F_SETFL, O_NONBLOCK);
#else
- Tcl_AppendResult(interp, "can't make pipes non-blocking",
+ Tcl_AppendResult(interp, "cannot make pipes non-blocking",
(char *)NULL);
return TCL_ERROR;
#endif