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

Re: [libvirt] [PATCH 0/6] Add internal APIs for disabling error reporting



On Thu, Nov 05, 2009 at 01:17:41PM -0500, Cole Robinson wrote:
> In testing migration, I was hitting an error in the Perform step, but this
> was being returned as 'Unknown Error' via virsh. The reason is that even
> a failed Perform will call MigrateFinish to do cleanup, but Finish will
> always return an NULL == error in that case, overwriting the original message.
> 
> I've added internal APIs which allow temporarily disabling error reporting:
> any ReportError calls will log the error message, but will not overwrite the
> previous error and will not trigger the error callback. These APIs are then
> used in a few places where they are needed.

I don't particularly like this as a concept. Could we do this the other
way around, whereby we call  virSaveLastError() before the bit of code
which might clobber the error we want, and then add a new method to set
it back afterwards.

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 :|


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