drift
drift copied to clipboard
Don't wrap exceptions in `DriftRemoteException` if not necessary
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.