aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/html/template/context.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/html/template/context.go')
-rw-r--r--libgo/go/html/template/context.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/libgo/go/html/template/context.go b/libgo/go/html/template/context.go
index 7ab3d1f..f7d4849 100644
--- a/libgo/go/html/template/context.go
+++ b/libgo/go/html/template/context.go
@@ -26,7 +26,11 @@ type context struct {
}
func (c context) String() string {
- return fmt.Sprintf("{%v %v %v %v %v %v %v}", c.state, c.delim, c.urlPart, c.jsCtx, c.attr, c.element, c.err)
+ var err error
+ if c.err != nil {
+ err = c.err
+ }
+ return fmt.Sprintf("{%v %v %v %v %v %v %v}", c.state, c.delim, c.urlPart, c.jsCtx, c.attr, c.element, err)
}
// eq reports whether two contexts are equal.