LiteDB
LiteDB copied to clipboard
[QUESTION] How to ignore Deserialization exceptions?
Hello,
I have a database that is storing instances of add-in classes. In some cases, the add-in assembly might not be loaded, so I want to ignore those properties/classes that cannot be created. As it stands right now, if I have 1 class that is missing/inactive, then my entire collection cannot load which doesn't seem right. Does anyone know the best way to ignore these deserlialization errors and simply return a 'null' for that object?
I am thinking that #1734 might be able to help, but it looks like the "Ignore" directive always ignores that property rather than selectively when it cannot deserialize an object.
Any help would be much appreciated.