mirror of https://github.com/AMT-Cheif/drift.git
Override `toString()` in `DriftRemoteException`
This commit is contained in:
parent
c6edcdf3e8
commit
b0ab9ba777
|
@ -202,4 +202,7 @@ class DriftRemoteException implements Exception {
|
|||
final StackTrace? remoteStackTrace;
|
||||
|
||||
DriftRemoteException._(this.remoteCause, this.remoteStackTrace);
|
||||
|
||||
@override
|
||||
String toString() => remoteCause.toString();
|
||||
}
|
||||
|
|
|
@ -85,6 +85,7 @@ void main() {
|
|||
fail('Should have thrown an exception');
|
||||
} catch (e, s) {
|
||||
expect(e, isA<DriftRemoteException>());
|
||||
expect(e.toString(), contains('no such table: non_existing_table'));
|
||||
|
||||
// The stack trace of remote exceptions should point towards the actual
|
||||
// source making the faulty call.
|
||||
|
|
Loading…
Reference in New Issue