drift icon indicating copy to clipboard operation
drift copied to clipboard

Don't wrap exceptions in `DriftRemoteException` if not necessary

Open simolus3 opened this issue 1 year ago • 0 comments

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 avatar Feb 03 '24 15:02 simolus3