summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-11-04 15:13:16 -0800
committerRob Pike <r@golang.org>2009-11-04 15:13:16 -0800
commit0b92ce67ff3a1ce51cc11dbaf6e0f30830d783af (patch)
tree5768a0b96633c6273edbff1b14366f4f0ce8bcb2 /src
parentcb8aaf42a95768cc8fa87ce1971f324acc272e3e (diff)
downloadgolang-0b92ce67ff3a1ce51cc11dbaf6e0f30830d783af.tar.gz
panic can't print interfaces well so use err.String()
R=rsc http://go/go-review/1016041
Diffstat (limited to 'src')
-rw-r--r--src/pkg/regexp/regexp.go2
-rw-r--r--src/pkg/template/template.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/regexp/regexp.go b/src/pkg/regexp/regexp.go
index 4ece95b66..399981571 100644
--- a/src/pkg/regexp/regexp.go
+++ b/src/pkg/regexp/regexp.go
@@ -630,7 +630,7 @@ func Compile(str string) (regexp *Regexp, error os.Error) {
func MustCompile(str string) *Regexp {
regexp, error := Compile(str);
if error != nil {
- panicln(`regexp: compiling "`, str, `": `, error);
+ panicln(`regexp: compiling "`, str, `": `, error.String());
}
return regexp;
}
diff --git a/src/pkg/template/template.go b/src/pkg/template/template.go
index cd0514ba2..85da9121c 100644
--- a/src/pkg/template/template.go
+++ b/src/pkg/template/template.go
@@ -898,7 +898,7 @@ func Parse(s string, fmap FormatterMap) (t *Template, err os.Error) {
func MustParse(s string, fmap FormatterMap) *Template {
t , err := Parse(s, fmap);
if err != nil {
- panic("template parse error: ", err);
+ panic("template parse error: ", err.String());
}
return t
}