[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Error messages again
From: |
John Darrington |
Subject: |
Error messages again |
Date: |
Thu, 18 May 2006 19:10:34 +0800 |
User-agent: |
Mutt/1.5.4i |
I'm still trying to work out a way to reconcile the pspp "struct msg"
with the glib GError API.
http://developer.gnome.org/doc/API/2.0/glib/glib-Error-Reporting.html#GError
typedef struct {
GQuark domain;
gint code;
gchar *message;
} GError;
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.
J'
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.
pgpanxNl4u5wZ.pgp
Description: PGP signature
- Error messages again,
John Darrington <=