Commit e119149
committed
Safely convert payloads to strings
For non-error tuples `Exception.normalize/3` returns the original
payload, which may be anything. Some payloads such as tuples don't
implement the `String.Chars` protocol. So cally `to_string/1` will fail.
In such cases we fall back to `inspect/1`.1 parent 428f4c7 commit e119149
1 file changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
236 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
237 | 248 | | |
238 | 249 | | |
239 | 250 | | |
| |||
0 commit comments