Commit 806dea82 authored by Ian Lance Taylor's avatar Ian Lance Taylor

fmt: document that if String or Error panics, that value is printed

Fixes #5350.

R=r, minux.ma
CC=golang-dev
https://golang.org/cl/8950043
parent 13721cf6
......@@ -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
......
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