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



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.

-- 
Chris Ladd
Email: caladd particlestorm net
Web: http://www.particlestorm.net
GnuPG Key ID: 0x85B2BEAE

Attachment: signature.asc
Description: This is a digitally signed message part



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