[Top][All Lists]

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

Re: Error messages again

From: John Darrington
Subject: Re: Error messages again
Date: Thu, 18 May 2006 22:45:08 +0800
User-agent: Mutt/1.5.4i

On Thu, May 18, 2006 at 07:06:53AM -0700, Ben Pfaff wrote:
     John Darrington <address@hidden> writes:
     > The "domain" field is roughly equivalent to our class member, so
     > converting between the two will be resonably straightforward.  But the
     > "code" member has no equivalent. It needs to be a unique number for
     > each error message.
     > I'm not sure how we'd implement that.  One idea would be to  have it
     > initialsed whenever the function msg is called: Change msg to a macro,
     > and initialise code to a hash of the __FILE__, __LINE__ combination.
     What does the "code" member actually get used for?  i.e. is there
     a reason we should actually care that it is unique?

There's a function :

/* Returns TRUE if error matches domain and code, FALSE otherwise. */
gboolean    g_error_matches                 (const GError *error,
                                             GQuark domain,
                                             gint code);

So the (domain, code) pair should be unique.


PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See or any PGP keyserver for public key.

Attachment: pgp2SqLAFpfwv.pgp
Description: PGP signature

reply via email to

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