fix(ado.net): translate SpannerException to SpannerDbException#772
fix(ado.net): translate SpannerException to SpannerDbException#772olavloite wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds exception translation to the Read, CheckForRows, and NextResult methods in SpannerDataReader, and introduces a new unit test to verify exception handling during both synchronous and asynchronous reads. The reviewer feedback suggests replacing the lambda-based exception translation with direct try-catch blocks to avoid unnecessary delegate allocations on hot paths. Additionally, the reviewer recommends marking the new test with the [NonParallelizable] attribute because it modifies global environment variables and state, which could cause flakiness when tests are run in parallel.
Translate SpannerException to SpannerDbException for the sync code paths in SpannerDataReader, to ensure consistency between the sync and async methods.
089b247 to
164089c
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces exception translation in SpannerDataReader for the Read, CheckForRows, and NextResult methods to ensure SpannerException is properly mapped to SpannerDbException, and adds a corresponding unit test. The feedback suggests refactoring these newly added try-catch blocks by utilizing an existing SpannerDbException.TranslateException helper overload that accepts a lambda, which would make the code cleaner and more maintainable.
Translate SpannerException to SpannerDbException for the sync code paths in SpannerDataReader, to ensure consistency between the sync and async methods.