Re: [libvirt] [PATCH] Unify most error reporting (ver 2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 10, 2008 at 03:16:09PM +0200, Jim Meyering wrote:
> Jim Meyering <jim@xxxxxxxxxxxx> wrote:
> 
> > "Daniel P. Berrange" <berrange@xxxxxxxxxx> wrote:
> > ...
> >> Some parts of qemu supply it, many other parts do not since they
> >> have no access to the virDomainPtr object. This is one of the
> >> reasons for deprecating this field - it was impossible to reliably
> >> provide it when raising errors.
> >>
> >> In this particular test case error, we are better off supplying the
> >> domain name in the format string - it'll improve the error message
> >> to have it placed in context of the description
> >>
> >> eg, instead of
> >>
> >>  libvir: Test error test: internal error Domain is still running
> >>
> >>
> >> We'd have
> >>
> >>  libvir: Test error: internal error Domain 'test' is still running
> >>
> >> Which could be done by changing
> >>
> >>     if (privdom->state != VIR_DOMAIN_SHUTOFF) {
> >>         testError(domain->conn, domain, NULL, VIR_ERR_INTERNAL_ERROR,
> >>                   _("Domain is still running"));
> >>
> >>
> >> to be
> >>
> >>     if (privdom->state != VIR_DOMAIN_SHUTOFF) {
> >>         testError(domain->conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
> >>                   _("Domain '%s' is still running"), domain->name);
> >
> > Yep.  I began doing that about 15 minutes ago ;-)
> 
> Here's the change to adjust src/test.c.
> Two change sets:
>   - Fix the "make check" failure by adjusting uses of testError,
>   including domain->name (and a few net->name) strings via format.
>   - Remove now-ignored dom and net parameters.

ACK, these both look good.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]