* Markus Armbruster ([email protected]) wrote:
> "Dr. David Alan Gilbert" <[email protected]> writes:
> > The problem is that our way of propagating errors actively discourages
> > people from adding errors and you're left with lots of useless invented
> > errno's.
> > error_report makes it easy for people to scatter meaningful error messages
> > in at any point.
> >
> > Make an easy, concise way of reporting an error that fits in with
> > a propagation scheme and I'd consider converting stuff.
>
> error_setg(errp, "This is as simple as it gets, I'm afraid")
>
> Snark aside, I acknowledge the pain of converting call chains to
> propagate Error objects, having converted "a few" myself.
If you can get it down to that line it would be great!
But unfortunately it isn't:
a) I have to make sure my cleanup path after that error_setg doesn't
cause any other errors because that breaks the rule
that I can't call error_setg twice.
b) I've got to put the whole local_err/error_propagate stuff all over.
c) We insist on allowing the Err ** pointer to be NULL that
removes some potential simplifications.
No; just too messy - give me something I can just drop those
error_setg's in and I'd be happy - it's everything around it
that I find truly painful.
Dave
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK