realm / realm-core

Core database component for the Realm Mobile Database SDKs
https://realm.io
Apache License 2.0
1.02k stars 165 forks source link

RCORE-2180 Add basic translation of NSExceptions to Status #8010

Closed tgoyne closed 2 months ago

tgoyne commented 2 months ago

When the Swift API is misused from within a callback from core a NSException may escape, which we want to propagate. Since this is always a fatal error that cannot be programmatically handled by the user, we can always translate this to UnknownError rather than trying to preserve the original error code.

Fixes #7836.

coveralls-official[bot] commented 2 months ago

Pull Request Test Coverage Report for Build thomas.goyne_495

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/realm/exceptions.mm 16 17 94.12%
<!-- Total: 26 27 96.3% -->
Files with Coverage Reduction New Missed Lines %
src/realm/array_backlink.cpp 1 91.38%
src/realm/dictionary.cpp 1 85.16%
src/realm/sort_descriptor.cpp 1 94.06%
src/realm/util/file.cpp 1 84.84%
src/realm/util/serializer.cpp 1 90.43%
test/test_dictionary.cpp 1 99.83%
src/realm/query_expression.hpp 2 93.81%
src/realm/table_view.cpp 2 92.99%
src/realm/sync/client.cpp 3 90.96%
src/realm/sync/noinst/protocol_codec.hpp 3 75.74%
<!-- Total: 65 -->
Totals Coverage Status
Change from base Build 2589: -0.003%
Covered Lines: 217379
Relevant Lines: 238580

💛 - Coveralls