On Mon, Jul 03, 2017 at 03:21:56PM +0200, Markus Armbruster wrote:
> Eduardo Habkost writes:
>
> > On Fri, Jun 30, 2017 at 01:40:58PM +0200, Markus Armbruster wrote:
> > [...]
> >>
> >> I doubt the macros make the bug fixing materially easier, and I doubt
> >> they can reduce future bugs of this
Eduardo Habkost writes:
> On Fri, Jun 30, 2017 at 01:40:58PM +0200, Markus Armbruster wrote:
> [...]
>>
>> I doubt the macros make the bug fixing materially easier, and I doubt
>> they can reduce future bugs of this kind. What they can do is letting
>> us get rid of error_propagate() boilerplat
Eduardo Habkost writes:
> On Fri, Jun 30, 2017 at 01:40:58PM +0200, Markus Armbruster wrote:
>> Eduardo Habkost writes:
>>
>> > On Thu, Jun 29, 2017 at 08:54:29AM +0200, Markus Armbruster wrote:
>> >> Eduardo Habkost writes:
>> >>
>> >> > On Wed, Jun 28, 2017 at 11:05:26AM +0200, Markus Armbr
On Fri, Jun 30, 2017 at 01:40:58PM +0200, Markus Armbruster wrote:
[...]
>
> I doubt the macros make the bug fixing materially easier, and I doubt
> they can reduce future bugs of this kind. What they can do is letting
> us get rid of error_propagate() boilerplate with relative ease.
>
> If we s
On Fri, Jun 30, 2017 at 01:40:58PM +0200, Markus Armbruster wrote:
> Eduardo Habkost writes:
>
> > On Thu, Jun 29, 2017 at 08:54:29AM +0200, Markus Armbruster wrote:
> >> Eduardo Habkost writes:
> >>
> >> > On Wed, Jun 28, 2017 at 11:05:26AM +0200, Markus Armbruster wrote:
> >> >> Eduardo Habko
Eduardo Habkost writes:
> On Thu, Jun 29, 2017 at 08:54:29AM +0200, Markus Armbruster wrote:
>> Eduardo Habkost writes:
>>
>> > On Wed, Jun 28, 2017 at 11:05:26AM +0200, Markus Armbruster wrote:
>> >> Eduardo Habkost writes:
> [...]
>> >> > I understand the reason we need to support errp==NULL
On Thu, Jun 29, 2017 at 02:47:34PM -0300, Eduardo Habkost wrote:
> On Thu, Jun 29, 2017 at 06:38:50PM +0100, Daniel P. Berrange wrote:
> > On Thu, Jun 29, 2017 at 02:09:39PM -0300, Eduardo Habkost wrote:
> > > On Thu, Jun 29, 2017 at 03:18:05PM +0100, Daniel P. Berrange wrote:
> > > > On Thu, Jun 2
On Thu, Jun 29, 2017 at 06:38:50PM +0100, Daniel P. Berrange wrote:
> On Thu, Jun 29, 2017 at 02:09:39PM -0300, Eduardo Habkost wrote:
> > On Thu, Jun 29, 2017 at 03:18:05PM +0100, Daniel P. Berrange wrote:
> > > On Thu, Jun 29, 2017 at 03:39:58PM +0200, Paolo Bonzini wrote:
> > > > On 28/06/2017 1
On Thu, Jun 29, 2017 at 02:09:39PM -0300, Eduardo Habkost wrote:
> On Thu, Jun 29, 2017 at 03:18:05PM +0100, Daniel P. Berrange wrote:
> > On Thu, Jun 29, 2017 at 03:39:58PM +0200, Paolo Bonzini wrote:
> > > On 28/06/2017 11:05, Markus Armbruster wrote:
> > > > If foo() additionally returned an ind
On Thu, Jun 29, 2017 at 03:18:05PM +0100, Daniel P. Berrange wrote:
> On Thu, Jun 29, 2017 at 03:39:58PM +0200, Paolo Bonzini wrote:
> > On 28/06/2017 11:05, Markus Armbruster wrote:
> > > If foo() additionally returned an indication of success, you could write
> > >
> > > if (!foo(arg, errp
On Thu, Jun 29, 2017 at 03:39:58PM +0200, Paolo Bonzini wrote:
> On 28/06/2017 11:05, Markus Armbruster wrote:
> > If foo() additionally returned an indication of success, you could write
> >
> > if (!foo(arg, errp)) {// assuming foo() returns a bool
> > handle the error...
> >
On Wed, Jun 28, 2017 at 11:05:26AM +0200, Markus Armbruster wrote:
> Eduardo Habkost writes:
>
> > Rationale
> > -
> >
> > I'm often bothered by the fact that we can't write the following:
> >
> > foo(arg, errp);
> > if (*errp) {
> > handle the error...
> > error_p
On Wed, Jun 28, 2017 at 02:41:58PM -0300, Eduardo Habkost wrote:
> On Wed, Jun 28, 2017 at 11:05:26AM +0200, Markus Armbruster wrote:
> > > Ensuring errp is never NULL
> > > ---
> > >
> > > The last patch on this series changes the (Error **errp)
> > > parameters in functio
On 28/06/2017 11:05, Markus Armbruster wrote:
> If foo() additionally returned an indication of success, you could write
>
> if (!foo(arg, errp)) {// assuming foo() returns a bool
> handle the error...
> }
>
> Nicely concise.
>
> For what it's worth, this is how GLib wa
On Thu, Jun 29, 2017 at 08:54:29AM +0200, Markus Armbruster wrote:
> Eduardo Habkost writes:
>
> > On Wed, Jun 28, 2017 at 11:05:26AM +0200, Markus Armbruster wrote:
> >> Eduardo Habkost writes:
[...]
> >> > I understand the reason we need to support errp==NULL, as it
> >> > makes life simpler f
Eduardo Habkost writes:
> On Wed, Jun 28, 2017 at 11:05:26AM +0200, Markus Armbruster wrote:
>> Eduardo Habkost writes:
>>
>> > Rationale
>> > -
>> >
>> > I'm often bothered by the fact that we can't write the following:
>> >
>> > foo(arg, errp);
>> > if (*errp) {
>> > h
On Wed, Jun 28, 2017 at 11:05:26AM +0200, Markus Armbruster wrote:
> Eduardo Habkost writes:
>
> > Rationale
> > -
> >
> > I'm often bothered by the fact that we can't write the following:
> >
> > foo(arg, errp);
> > if (*errp) {
> > handle the error...
> > error_p
Eduardo Habkost writes:
> Rationale
> -
>
> I'm often bothered by the fact that we can't write the following:
>
> foo(arg, errp);
> if (*errp) {
> handle the error...
> error_propagate(errp, err);
> }
>
> because errp can be NULL.
If foo() additionally returne
On 06/13/2017 11:52 AM, Eduardo Habkost wrote:
> The Proposal
>
>
> I'm proposing replacing NULL errp with a special macro:
> IGNORE_ERRORS. The macro will trigger special behavior in the
> error API that will make it not save any error information in the
> error pointer, but still
Rationale
-
I'm often bothered by the fact that we can't write the following:
foo(arg, errp);
if (*errp) {
handle the error...
error_propagate(errp, err);
}
because errp can be NULL.
I understand the reason we need to support errp==NULL, as it
makes life simp
20 matches
Mail list logo