Cumulus / Syndic

RSS and Atom feed parsing
MIT License
34 stars 13 forks source link

Error reporting #19

Closed Chris00 closed 10 years ago

Chris00 commented 10 years ago

I'd like to discuss about error reporting.

  1. As I understand it, the arguments of Expected are more for human consumption and not so much for post processing. If I am right, it would be better to use strings (or at least to attach a pretty printing function) so they display readably in the shell when an uncaught exception occurs.
  2. The date parsing can raise Invalid_argument but I think it would be better to use a Syndic error (and possibly give some context when they fail).
  3. I am wondering whether Expected_Leaf should exist at all. After all, the spec mandates the tag to be present but its content may be empty! AFAIU, even the person construct allow, say, <name></name>.
Chris00 commented 10 years ago

P.S. I am on the verge of wiping out Expected_Leaf and thus also Error.Data... I had already to remore error reporting in some cases because some feeds contain, say, <description></description>. Please let me know what you think!

dinosaure commented 10 years ago

See #35.

dinosaure commented 10 years ago

Close by #35.