Commit 56cba885 authored by Rob Pike's avatar Rob Pike

panic can't print interfaces well so use err.String()

R=rsc
http://go/go-review/1016041
parent 2f792d32
......@@ -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;
}
......
......@@ -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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment