fjoppe / Legivel

F# Yaml 1.2 parser
https://fjoppe.github.io/Legivel
The Unlicense
60 stars 5 forks source link

Output more descriptive errors when deserializing a record with unsupported types #34

Closed EverybodyKurts closed 3 years ago

EverybodyKurts commented 3 years ago

Description

Currently, the Legivel library crashes with an arcane error message when encountering a record with a value type it doesn't support. In the below example, the deserializer crashes because the record type is an unsigned integer. The message isn't easy to decipher and doesn't clue me into the fact that the deserializer doesn't like the unsigned integer.

Screen Shot 2021-01-31 at 8 38 47 PM

Expected behavior

The following error message like the one below would be nice:

Screen Shot 2021-01-31 at 8 46 54 PM
fjoppe commented 3 years ago

Hi,

Thanks for reporting. This is incorrect in different ways:

I'm looking into it..

fjoppe commented 3 years ago

This has now been fixed and published in version 0.4.6: https://www.nuget.org/packages/Legivel/0.4.6