koculu/ZoneTree

[BUG] When ValueSerializer type has a mismatch, the error message shows the KeySerializer type.

Closed this issue · 1 comments

Describe the bug
When ValueSerializer type has a mismatch, the error message shows the KeySerializer type.

To Reproduce
Create a database, change the type of the ValueSerializer and reopen. The message in the exception thrown has the wrong types.

Expected behavior
The error message shows the ValueSerializer types that mismatched, not the KeySerializer types.

Screenshots

The issue seems to be with this statement, in ZoneTreeLoader.cs, it is passing the wrong types into the exception constructor.

if (!string.Equals(ZoneTreeMeta.ValueSerializerType, Options.ValueSerializer.GetType().FullName, StringComparison.Ordinal))
    throw new TreeValueSerializerTypeMismatchException(
        ZoneTreeMeta.KeySerializerType,
        Options.KeySerializer.GetType().FullName);

please complete the following information:

  • Operating System: Windows
  • ZoneTree Version: 1.6.5
koculu commented

Thank you @jmickey8080 for reporting this issue. It is fixed with #44.