Skip to content
Tcl Source Code View Ticket
Login

View Ticket

return -code error blurb behaves wrong in auto loaded file

Closed / Fixed218993ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:09:03
OriginalBugID: 3707 Bug
Version: 8.0.5
SubmitDate: '1999-11-29'
LastModified: '2000-01-31'
Severity: MED
Status: Released
Submitter: techsupp
ChangedBy: ericm
OS: Linux
OSVersion: Linux Gauss 2.0.31 #4 Wed Aug 26 20:26:05 MET DST 1998 i586
Machine: P75
FixedDate: '2000-01-31'
FixedInVersion: 8.1.1
ClosedDate: '2000-10-25'


Name:
Harald Kirsch

Comments:
The error does not show up on 8.0.4.

ReproducibleScript:
To reproduce the error, two scripts are necessary.
---------------------------------------------
## This file must be called `bla'
package provide bug 1.0
proc bug {} {
  return -code error arrrgh
}
--------------------------------------------
## This file can have any name, say `bli'
lappend auto_path .
pkg_mkIndex . bla

package require bug

if {[catch {bug} err]} {
  puts "This is  [info patchlevel]."
  puts "The `$err' should not have been printed two lines above."
} else {
  puts "This should not happen"
}
------------------------------------------
Store both files in the same directory and run the latter in tclsh from that directory.

ObservedBehavior:
The output on my machine looks like:

... arrrgh
This is  8.0.5.
The `arrrgh' should not have been printed two lines above.

Obviously, the first `arrrgh' is wrong. The return command in `bla' produces some output on the
console.

DesiredBehavior:
The return command is not supposed to produce output on the console.



This bug does not appear in 8.3.  I cannot say with any high degree of certainty precisely when it was fixed.

- eric

-- 01/31/2000 ericm
welch Closed ticket [218993ffff]. [History diff]2000-10-26 08:33:08
dgp Ticket [218993ffff]: 3 changes [History diff]2001-04-06 02:03:30
Log in (anonymous is fine) to add a comment.