Repository navigation
fix(csharp): align driver and manifest loading errors with c++ - #4973
Merged
CurtHagenlocher merged 2 commits intoOct 28, 2026
Merged
Conversation
amoeba
marked this pull request as ready for review
October 28, 2026 22:25
Member
Author
|
Hey @CurtHagenlocher, I'm curious what you think about syncing up the error behavior like I've done here. I'm not totally sure it's critical but I thought I'd put up a PR so you could look. |
CurtHagenlocher
approved these changes
Oct 28, 2026
CurtHagenlocher
left a comment
Contributor
There was a problem hiding this comment.
Thanks, this is great!
lidavidm
pushed a commit
that referenced
this pull request
Nov 4, 2026
…th c++ (#4993) Updates the Rust driver manager search code to return errors and error details that match what C++ and C# do. Each test covers a case and the table below describes what changed at high level: | Test | Before | After | |---|---|---| | `test_load_from_name_missing_or_invalid_driver` | `Internal` | `NotFound`, with the path in the error | | `test_manifest_wrong_arch` | `InvalidArguments` | `NotFound`, with more detail in the error | | `test_load_dynamic_missing_driver` | `Internal` | `NotFound`, with the path in the error | | `test_empty_driver_name` | `NotFound` | `InvalidArguments`, with a clear error message | | `test_load_from_name_invalid_manifest_by_path_or_name` | `InvalidArguments` by path, `NotFound` by name | `InvalidArguments` either way, and the error includes the manifest path | | `test_relative_driver_path_disallowed` | `InvalidArguments` | `InvalidArguments`, and the error now includes the path | This PR makes the Rust column in the table on #4973 match the other columns. Continuation of: - #4972 - #4973 This PR was created by driving Opus 5.5 around. I reviewed it with GPT Sol 6.1 and Opus 5.5 and reviewed the tests myself.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR syncs the C# driver manager's failure behavior with the other driver managers.
I noticed the driver manager implementations don't perfectly align with respect to what errors they return for various driver and manifest loading failures. I'm not sure we need to have every driver manager return the exact same error class and detail but I noticed the C# driver manager returns non-ADBC errors in some cases where the other driver managers return an ADBC error with the underlying error wrapped. I think at least being consistent about when the user gets an ADBC error or not is a good starting place.
I had Opus 5.5 help me outline these cases, analyze other driver managers, and produce this table that highlights the behavioral difference in the C# driver manager:
NOT_FOUNDINTERNALSystem.ArgumentException(not an ADBC error)NOT_FOUNDINTERNALSystem.DllNotFoundException(not an ADBC error).toml, or a path without extension with a.tomlof the same name next to it)INVALID_ARGUMENTINVALID_ARGUMENTNOT_FOUNDINVALID_ARGUMENTINVALID_ARGUMENTINVALID_ARGUMENTDriver.sharedkeyINVALID_ARGUMENTINVALID_ARGUMENTINVALID_ARGUMENTDriver.sharedentry for this platformNOT_FOUNDINVALID_ARGUMENTNOT_FOUNDNOT_FOUNDINTERNALSystem.ArgumentException(not an ADBC error)NOT_FOUNDINTERNALSystem.DllNotFoundException(not an ADBC error)NOT_FOUNDNOT_FOUNDNOT_FOUNDNOT_FOUNDNOT_FOUNDSystem.ArgumentException(not an ADBC error)NOT_FOUNDNOT_FOUNDSystem.DllNotFoundException(not an ADBC error)The PR makes C# match C++ in the above cases. Technically this could be marked as a breaking change though it's less likely that users depend on error behaviors in the same way they depend on non-error behaviors.