Commit d320ea2
committed
When getting the error context handle the case where the exception does not come from pycbc_core
Motivation
==========
If the error context is not set and the exception does not come from pycbc_core, calling an exception's error_context() method results in a "AttributeError: 'NoneType' object has no attribute 'error_context'".
Changes
=======
In the error_context getter, if the _base attribute of a CouchbaseException is None and _context is None, return an empty error context.
Change-Id: I0b37a81d4369dbd920665b95be1eb59d34f20e61
Reviewed-on: https://review.couchbase.org/c/couchbase-python-client/+/203433
Reviewed-by: Jared Casey <jared.casey@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>1 parent a1161ae commit d320ea2
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
376 | 379 | | |
377 | 380 | | |
378 | 381 | | |
| |||
0 commit comments