Thread (9 messages) 9 messages, 2 authors, 2008-03-26

Re: dtc: Simplify error handling for unparseable input

flat view

From: David Gibson <hidden>
Date: 2008-03-25 23:52:02

On Tue, Mar 25, 2008 at 05:10:07PM -0500, Scott Wood wrote:
David Gibson wrote:
quoted
On Tue, Mar 25, 2008 at 09:36:19AM -0500, Scott Wood wrote:
quoted
On Tue, Mar 25, 2008 at 12:28:05PM +1100, David Gibson wrote:
quoted
On Mon, Mar 24, 2008 at 12:36:41PM -0500, Scott Wood wrote:
quoted
If you remove this, there'll be no way to indicate semantic errors 
other
than die() (the NULL approaches are no good, since they inhibit 
recovery),
which is suboptimal if the error is not immediately fatal.
But everything is immediately fatal.  When we have a *real* example of
something that's not, we can restore an error code.
Failed binary includes are not immediately fatal.
And is there any advantage to having them not immediately fatal?
It's generally nice to the user if you can report as many bugs as you can 
rather than fail on the first one.
Hrm, I guess.  There's only so far it's worth going to achieve that
though.
It's also nice to someone down the road trying to turn this code into a 
library if it passes return status up the call chain gracefully.
Can you think of any reason we'd want to do that?  And that would
require fixing so many other places that the two cases which do return
an error (that's including binary includes) hardly signify.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help