Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't wrap exceptions in DriftRemoteException if not necessary #2879

Open
simolus3 opened this issue Feb 3, 2024 · 0 comments
Open

Don't wrap exceptions in DriftRemoteException if not necessary #2879

simolus3 opened this issue Feb 3, 2024 · 0 comments
Labels
breaking A breaking change that would require a major version jump enhancement New feature or request package-drift Affects the core drift package

Comments

@simolus3
Copy link
Owner

simolus3 commented Feb 3, 2024

For exceptions happening on an other isolate or other server through the remote protocol, we wrap the exception in a DriftRemoteException.

At the time drift first gained support for isolates, we couldn't reliably send arbitrary Dart objects across send ports, and so we had to transport exceptions by calling toString() on them, without giving users better details about what happened. This is no longer a concern in recent Dart versions, and so we should drop this exception wrapper and just surface a copy of the exception object we got from the other isolate.

@simolus3 simolus3 added enhancement New feature or request breaking A breaking change that would require a major version jump package-drift Affects the core drift package labels Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A breaking change that would require a major version jump enhancement New feature or request package-drift Affects the core drift package
Projects
None yet
Development

No branches or pull requests

1 participant