Re: [Planner Dev] New undo patch: Link/unlink tasks



On ons, 2004-05-05 at 22:33 -0700, Chris Ladd wrote:
> On Wed, 2004-05-05 at 23:01, Alvaro del Castillo wrote:
> 
> > Hmm, finally, after trying to remove the cmd->success field, I have
> > found why I need it. If a command fails, I need to know why, and this is
> > why we need the cmd->error string field.
> > 
> > But then, we can return NULL when a PlannerCmd fails because we can't
> > access then to the cmd->error field :(
> > 
> > One solution could be to have a global last error field in
> > PlannerCmdManager, but I don't like a lot the idea becasue we can have
> > sync problems between several commands.
> 
> How about adding a GError **err to be passed into the PlannerCmd
> creation function? Here is the documentation on it for quick reference: 
> 
> http://developer.gnome.org/doc/API/2.0/glib/glib-Error-Reporting.html
> 
> This framework seems nice and has most the work done for you already.

Exactly what I was about to suggest :)

/Richard

-- 
Imendio HB, http://www.imendio.com/




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