diff options
Diffstat (limited to 'test/recover3.go')
-rw-r--r-- | test/recover3.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/recover3.go b/test/recover3.go index 2aa1df616..98700231e 100644 --- a/test/recover3.go +++ b/test/recover3.go @@ -1,9 +1,11 @@ -// $G $D/$F.go && $L $F.$A && ./$A.out +// run // Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// Test recovering from runtime errors. + package main import ( @@ -35,7 +37,7 @@ func check(name string, f func(), err string) { println(name, "panicked but not with runtime.Error") return } - s := runt.String() + s := runt.Error() if strings.Index(s, err) < 0 { bug() println(name, "panicked with", s, "not", err) |