Commit 761b5a7
committed
Extend exception mapping to all connection methods
Address reviewer feedback: wrap remaining connection methods that call C++
to ensure complete SQLSTATE error mapping coverage.
Additional methods now wrapped with try-catch + _raise_connection_error:
- autocommit property getter (get_autocommit)
- set_attr() for connection attributes
- getinfo() for connection information
- close() internal rollback during cleanup
This ensures users never see raw RuntimeError with SQLSTATE prefixes
from any connection operation. All C++ checkError() calls now properly
map to correct DB-API 2.0 exception types.
Addresses review comment on PR #5621 parent c3b8b97 commit 761b5a7
1 file changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | | - | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
500 | 503 | | |
501 | 504 | | |
502 | 505 | | |
| |||
928 | 931 | | |
929 | 932 | | |
930 | 933 | | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
931 | 937 | | |
932 | 938 | | |
933 | 939 | | |
| |||
1308 | 1314 | | |
1309 | 1315 | | |
1310 | 1316 | | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
1311 | 1320 | | |
1312 | 1321 | | |
1313 | 1322 | | |
| |||
1619 | 1628 | | |
1620 | 1629 | | |
1621 | 1630 | | |
1622 | | - | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
1623 | 1636 | | |
1624 | 1637 | | |
1625 | 1638 | | |
| |||
0 commit comments