Descriptionfmt: catch panics from calls to String etc.
This change causes Print et al. to catch panics generated by
calls to String, GoString, and Format. The panic is formatted
into the output stream as an error, but the program continues.
As a special case, if the argument was a nil pointer, the
result is just "<nil>", because that's almost certainly enough
information and handles the very common case of String
methods that don't guard against nil.
Scan does not want this change. Input must work; output can
be for debugging and it's nice to get output even when you
make a mistake.
Patch Set 1 #
Total comments: 1
Patch Set 2 : diff -r 6c1b861053e0 https://go.googlecode.com/hg/ #Patch Set 3 : diff -r 6c1b861053e0 https://go.googlecode.com/hg/ #
Total comments: 4
Patch Set 4 : diff -r 40a281c810e2 https://go.googlecode.com/hg/ #Patch Set 5 : diff -r 40a281c810e2 https://go.googlecode.com/hg/ #
Total comments: 1
Patch Set 6 : diff -r 4d510d32c397 https://go.googlecode.com/hg/ #MessagesTotal messages: 15
|