summaryrefslogtreecommitdiff
path: root/src/pkg/fmt/doc.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/fmt/doc.go')
-rw-r--r--src/pkg/fmt/doc.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pkg/fmt/doc.go b/src/pkg/fmt/doc.go
index 3cd02d7ed..b8dd995c7 100644
--- a/src/pkg/fmt/doc.go
+++ b/src/pkg/fmt/doc.go
@@ -138,6 +138,16 @@
by a single character (the verb) and end with a parenthesized
description.
+ If an Error or String method triggers a panic when called by a
+ print routine, the fmt package reformats the error message
+ from the panic, decorating it with an indication that it came
+ through the fmt package. For example, if a String method
+ calls panic("bad"), the resulting formatted message will look
+ like
+ %s(PANIC=bad)
+
+ The %s just shows the print verb in use when the failure
+ occurred.
Scanning