Hi Folks,

I ran Daffodil on my DFDL schema and got this error message:

[error] Left over data. Consumed 1504 bit(s) with at least 3040 bit(s) 
remaining.
Left over data (Hex) starting at byte 189 is: (0x0d0a47454e544558...)
Left over data (UTF-8) starting at byte 189 is: (??GENTEX...)

That is a really bad error message. Why did Daffodil stop consuming the input? 
No idea. What is in my DFDL schema that caused the generation of the error? No 
idea.

No disrespect intended, but Daffodil has the worst error messages of any tool 
that I have ever encountered.

Good error messages are important. In a recent podcast Michael Kay (creator of 
Saxon) talks about his emphasis on good error messages:

What makes a good product? Users must be able to understand the error messages. 
People will tell you, one thing I like about Saxon is the error messages. To 
me, a bad error message is something that really needs to be fixed. Error 
messages are what users are dealing with every day. They are reading my error 
messages. If those glare out as being unhelpful, as being badly spelled, then 
that's their experience with the product, so it's important to get it right. I 
put a lot of effort into those sorts of little details. Getting good error 
messages it really quite an art. Do you phrase the error message in terms of 
the proper terminology of the spec, or do you use the terminology that the 
users are using (which might be quite wrong)? For example, what many users call 
a "tag" isn't what the spec calls a tag. They'll use "tag" to mean "element." 
So which word am I going to use in an error message? It's quite hard to get 
that sort of thing right. Getting a balance between a message that is 
technically correct and a message that users understand, sometimes requires a 
fair bit of thought. And then you've got to phrase the error message in terms 
of what the user was trying to do, not what was going on internally. That again 
gives you a significant challenge. So you have to think about those sorts of 
things.

/Roger

Reply via email to