1 # Package which can generate a variety of errors at known locations
3 proc error_generator
{type
} {
15 set x
"some $bogus text"
18 set x
"some $bogus text"
30 return -code error failure
36 puts "Unknown type=$type"
40 # line 40: Some empty lines above so that line numbers don't change
41 proc error_caller
{type
{method call
}} {
47 uplevel 1 [list error_generator
$type]
50 eval [list error_generator
$type]
53 eval error_generator
$type
56 puts "Unknown method=$method"
61 proc error_badproc
{} {
62 return [list missing bracket here