classifyErrorCodeOrEmpty is a test helper to surface the computed SQLSTATE in failure messages without crashing on nil errors.
(err error)
| 432 | // classifyErrorCodeOrEmpty is a test helper to surface the computed |
| 433 | // SQLSTATE in failure messages without crashing on nil errors. |
| 434 | func classifyErrorCodeOrEmpty(err error) string { |
| 435 | if err == nil { |
| 436 | return "(nil)" |
| 437 | } |
| 438 | return classifyErrorCode(err) |
| 439 | } |
| 440 | |
| 441 | // TestClassifyErrorCodeAgainstRealDuckDB drives queries that reliably |
| 442 | // produce each error prefix the classifier branches on, against a real |
no test coverage detected