diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-08-15 20:23:54 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-08-15 20:23:54 (GMT) |
commit | 539dee14dd53a081a6787a33d0cc731b5b2f329f (patch) | |
tree | ee872a83d3c887e120a260f12250968fde5101bf | |
parent | 5eed049c6cf5c50b4c4994f26c13d27a48581f78 (diff) | |
download | tcl-539dee14dd53a081a6787a33d0cc731b5b2f329f.zip tcl-539dee14dd53a081a6787a33d0cc731b5b2f329f.tar.gz tcl-539dee14dd53a081a6787a33d0cc731b5b2f329f.tar.bz2 |
Improve bunch of error-messages
-rw-r--r-- | generic/rege_dfa.c | 2 | ||||
-rw-r--r-- | generic/regerrs.h | 4 | ||||
-rw-r--r-- | generic/tclBasic.c | 2 | ||||
-rw-r--r-- | generic/tclInterp.c | 2 | ||||
-rw-r--r-- | generic/tclRegexp.c | 2 | ||||
-rw-r--r-- | generic/tclTest.c | 2 | ||||
-rw-r--r-- | generic/tclThreadTest.c | 2 | ||||
-rw-r--r-- | macosx/tclMacOSXNotify.c | 2 | ||||
-rw-r--r-- | tests/load.test | 6 | ||||
-rw-r--r-- | tests/lsearch.test | 2 | ||||
-rw-r--r-- | tests/reg.test | 2 | ||||
-rw-r--r-- | tests/regexp.test | 10 | ||||
-rw-r--r-- | tests/regexpComp.test | 8 | ||||
-rw-r--r-- | tests/safe.test | 8 | ||||
-rw-r--r-- | tests/switch.test | 2 | ||||
-rw-r--r-- | tools/regexpTestLib.tcl | 2 | ||||
-rw-r--r-- | unix/tclLoadAix.c | 4 | ||||
-rw-r--r-- | unix/tclLoadDyld.c | 2 | ||||
-rw-r--r-- | unix/tclUnixTest.c | 2 |
19 files changed, 33 insertions, 33 deletions
diff --git a/generic/rege_dfa.c b/generic/rege_dfa.c index eddfea2..9586f66 100644 --- a/generic/rege_dfa.c +++ b/generic/rege_dfa.c @@ -790,7 +790,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 9c35889..e6dde32 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -1255,7 +1255,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 897126a..2935b34 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -442,7 +442,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/tclRegexp.c b/generic/tclRegexp.c index aaf8010..0e56a53 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -946,7 +946,7 @@ CompileRegexp( ckfree(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 fc328f0..d995046 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -960,7 +960,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 d74be9e..0a28301 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -508,7 +508,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 de633a5..6c14cc4 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -1777,7 +1777,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 be5b1c1..a60de52 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} -constraints \ [list $dll $loaded deprecated] -body { @@ -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 pkga$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 c913e60..fc7fa8c 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 16c775e..9e6b29a 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 42f1b3b..03f49da 100644 --- a/tests/regexpComp.test +++ b/tests/regexpComp.test @@ -333,12 +333,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 @@ -594,7 +594,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 @@ -972,7 +972,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 0a888f4..e9139c7 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 71dc909..3c125d8 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 17fca04..a66e435 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 43cb806..c42617c 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 2358d06..4c9ee8d 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.c @@ -207,7 +207,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 |