[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch #5916] error propagation layer
From: |
John Darrington |
Subject: |
Re: [patch #5916] error propagation layer |
Date: |
Fri, 4 May 2007 14:26:31 +0800 |
User-agent: |
Mutt/1.5.9i |
The idea and the implementation are fine. I'd hope that this could
get rid of a lot of the bool *warn_on_invalid flags and similar
kludges.
It's function and purpose seems rather similar to that of the GError object
from glib. It would be good if there was an easy way of converting
between a struct taint and a GError --- I'm sure that would save a lot
of hassle in the GUI code.
As for naming, as the purpose seems to be for error reporting, we
could go for something boring like pspp_error.
On Fri, May 04, 2007 at 04:01:35AM +0000, Ben Pfaff wrote:
I've written some code to help simplify error handling in the new
implementation of procedures in the simpler-proc branch. I think it is
ready
for review. I've attached it.
It's based on the idea of "taint propagation" that can be found in various
tools (e.g. Valgrind) and academic papers (e.g. one that I was involved in,
available via [http://www.stanford.edu/~blp/papers/taint.html]). The basic
rule of taint propagation (in this case) is "garbage in, garbage out".
That
is, any operation based on corrupted input has corrupted output.
Naming is something of a problem here. Currently the object is called a
"taint" and so is the property of "being tainted" and the action of
"tainting". Ideally these should be more distinct. One idea is to name
the
objects "gigo" (for garbage in, garbage out), the property "corrupted",
and
the action "spoil". Or whatever. I'm open to opinions.
What do you think?
--
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.
signature.asc
Description: Digital signature