File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 11## latest
22
33* Require at least Dart SDK 2.14 (shipped with Flutter 2.5.0).
4+ * When using the "All Exceptions" debug option in Visual Studio Code there is no longer an exception
5+ when initializing ObjectBox. #252
46
57## 1.5.0 (2022-05-11)
68
Original file line number Diff line number Diff line change @@ -19,14 +19,21 @@ ObjectBoxC? _tryObjectBoxLibProcess() {
1919 // [DynamicLibrary.process()] is not supported on windows, see its docs.
2020 if (Platform .isWindows) return null ;
2121
22- ObjectBoxC ? obxc ;
22+ final DynamicLibrary lib ;
2323 try {
24- _lib = DynamicLibrary .process ();
25- obxc = ObjectBoxC (_lib! );
26- _isSupportedVersion (obxc); // may throw in case symbols are not found
27- return obxc;
24+ lib = DynamicLibrary .process ();
2825 } catch (_) {
29- // ignore errors (i.e. symbol not found)
26+ // Ignore errors, caller will try using open.
27+ return null ;
28+ }
29+
30+ // Check if the library is actually loaded by searching for a common function.
31+ // Note: not using 'lookup' as its exception if not found is caught if
32+ // All Exceptions is enabled in VS Code.
33+ if (lib.providesSymbol ('obx_version' )) {
34+ _lib = lib;
35+ return ObjectBoxC (lib);
36+ } else {
3037 return null ;
3138 }
3239}
You can’t perform that action at this time.
0 commit comments