jacob-carlborg/orange

No Throwing on error

Aphexus opened this issue · 1 comments

How do I prevent missing fields from erroring out?

I see some functions have

throwOnError

but I'd like to just ignore missing fields(and use their default values).

Also, these functions seem to take the value but actually are not used(they do not pass it).

It is a huge design flaw not to allow missing fields. It means that any time one adds fields it will break the serializer... this means that dev time is greatly increased(after all, I've already wasted an hour trying to figure out how to get orange to work and it still doesn't work). Sure, I could reset my data so it is initialized again or add the fields to the xml by hand, but that isn't the correct way to do things.

Yeah. There are quite a few years since I built this library. I think that the idea would be to implement a custom serializer [1] if you want optional fields. But I don't think that will help.

[1] https://github.com/jacob-carlborg/orange/blob/master/tests/Custom.d