Unwrap BoxKeyError and BoxValueError errors to their cause. Use with `raise ... from _exception_cause(err)` to avoid deeply nested stacktraces, but keep the context.
(e)
| 63 | |
| 64 | |
| 65 | def _exception_cause(e): |
| 66 | """ |
| 67 | Unwrap BoxKeyError and BoxValueError errors to their cause. |
| 68 | |
| 69 | Use with `raise ... from _exception_cause(err)` to avoid deeply nested stacktraces, but keep the |
| 70 | context. |
| 71 | """ |
| 72 | return e.__cause__ if isinstance(e, (BoxKeyError, BoxValueError)) else e |
| 73 | |
| 74 | |
| 75 | def _camel_killer(attr): |
no outgoing calls
no test coverage detected