Description: |
Since snitv2 runs under tcl8.5, I think CallInstance
needs to handle the extended error options available
under 8.5, so suggest the following amendment:
proc ::snit::RT.CallInstance {selfns args} {
upvar ${selfns}::Snit_instance self
set retval [catch {uplevel 1 [linsert $args 0
$self]} result eo]
if {$retval} {
return -code $retval -options $eo $result
}
return $result
}
Although, now I think about it, it doesn't really make
sense to trap the errors merely to re-throw them, so it
might be best to just make it this:
proc ::snit::RT.CallInstance {selfns args} {
upvar ${selfns}::Snit_instance self
return [uplevel 1 [linsert $args 0 $self]]
}
Or even this:
proc ::snit::RT.CallInstance {selfns args} {
upvar ${selfns}::Snit_instance self
return [$self {expand}$args]
}
|