qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v0 0/9] QError


From: Luiz Capitulino
Subject: Re: [Qemu-devel] [PATCH v0 0/9] QError
Date: Thu, 15 Oct 2009 16:37:38 -0300

On Thu, 15 Oct 2009 14:24:57 -0500
Anthony Liguori <address@hidden> wrote:

> Luiz Capitulino wrote:
> >  This series adds infrastructure which will be needed by the future monitor
> > protocol to handle and emit error information correctly.
> >
> >  QError is a QObject designed to stored error information in way that it can
> > be emitted by the protocol code or printed in an user friendly way.
> >
> >  To use it in the Monitor and its handlers, I've added a function called
> > qemu_error_structed(), which builds on top of Gerd's QemuErrorSink API, this
> > means that it is also capable of printing error information to stderr.
> >
> >  Basically, we have a QError member in the Monitor struct, which will be set
> > if an error has occurred. The Monitor's top level code will check it at
> > handler exit time and handle the error properly.
> >
> >  QError represents an error, and it has the following properties:
> >
> > - Error code
> > - Error general description
> > - Error specific data
> >
> >  Code and description are stored in a static table in the QError module 
> > itself,
> > the error specific data is generated at error time by the function calling
> > qemu_error_structed().
> >
> >  This design is based on the way I plan to emit error information in the
> > protocol, which is:
> >
> > { "error": { "code": json-number,
> >              "desc": json-string,
> >              "data": json-value } "id": json-value, "timestamp": 
> > json-string }      
> >   
> 
> Why timestamp?

 I would have to dig the archives to find the thread, but some people have
asked to provide the timestamp on every replies (either, error or regular
output).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]