catchPanic handles any panics that might occur during the handleMethods calls.
(w io.Writer, v reflect.Value)
| 70 | // catchPanic handles any panics that might occur during the handleMethods |
| 71 | // calls. |
| 72 | func catchPanic(w io.Writer, v reflect.Value) { |
| 73 | if err := recover(); err != nil { |
| 74 | w.Write(panicBytes) |
| 75 | fmt.Fprintf(w, "%v", err) |
| 76 | w.Write(closeParenBytes) |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | // handleMethods attempts to call the Error and String methods on the underlying |
| 81 | // type the passed reflect.Value represents and outputs the result to Writer w. |
no test coverage detected
searching dependent graphs…