Commit 8e7a19a
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 8e7a19a
1 file changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
| 232 | + | |
| 233 | + | |
237 | 234 | | |
238 | 235 | | |
239 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
240 | 244 | | |
241 | 245 | | |
242 | 246 | | |
| |||
0 commit comments