You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following awkward code fails in an even more awkward way:
final config =Configuration([Car.schema]);
final realm =Realm(config);
realm.write(() {
// Second write inside the first one fails but the error is caughttry {
realm.write(() {});
} catch (ex) {}
});
The error is:
RealmException: Could not commit write. Error code: 5 . Message: Can't commit a non-existing write transaction
What ends up happening is
We start the outer write
We start inner write
Inner write fails
We hit the realm.write catch block, which rolls back the outer transaction and rethrows
We catch the exception from the inner write
Realm tries to commit the outer write, which fails because the transaction was rolled back in 4.
The text was updated successfully, but these errors were encountered:
The following awkward code fails in an even more awkward way:
The error is:
What ends up happening is
realm.write
catch block, which rolls back the outer transaction and rethrowsThe text was updated successfully, but these errors were encountered: