xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
Re: [XOM-interest] CanonicalXMLSerializer exceptions
- From: John Cowan <cowan AT mercury.ccil.org>
- To: Elliotte Harold <elharo AT metalab.unc.edu>
- Cc: xom-interest <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] CanonicalXMLSerializer exceptions
- Date: Sun, 9 Nov 2003 01:32:45 -0500
Elliotte Harold scripsit:
> I have an open question as to whether I should throw an exception if
> someone passes in something else such as "\r". Is it better to silently
> do the right and required thing here? (current behavior) or should I
> warn clients when they attempt to do the wrong thing by throwing an
> IllegalArgumentException?
Throwing the exception is IMHO the most XOMmish behavior; the user is
attempting to do the Wrong Thing and should be stopped. You don't
silently ignore illegal characters in element names, you except.
> On the other hand throwing the exception for
> different values the superclass will accept means I'd be tightening the
> preconditions on the subclass implementation. I think Bertrand Meyer
> (Object Oriented Software Construction) claims I'm not allowed to do that.
IOW, you can't 100% treat a CanonicalXMLSerializer as a Serializer.
Nor can you stuff 10# of *%$@ into a 5# bag. Life is like that.
--
A witness cannot give evidence of his John Cowan
age unless he can remember being born. jcowan AT reutershealth.com
--Judge Blagden http://www.ccil.org/~cowan
-
[XOM-interest] CanonicalXMLSerializer exceptions,
Elliotte Harold, 11/08/2003
- Re: [XOM-interest] CanonicalXMLSerializer exceptions, John Cowan, 11/09/2003
-
Re: [XOM-interest] CanonicalXMLSerializer exceptions,
Janek Bogucki, 11/10/2003
- Re: [XOM-interest] CanonicalXMLSerializer exceptions, Elliotte Rusty Harold, 11/10/2003
-
Re: [XOM-interest] CanonicalXMLSerializer exceptions,
Elliotte Rusty Harold, 11/10/2003
-
Re: [XOM-interest] CanonicalXMLSerializer exceptions,
Nils_Kilden-Pedersen, 11/11/2003
-
Re: [XOM-interest] CanonicalXMLSerializer exceptions,
Janek Bogucki, 11/13/2003
-
Re: [XOM-interest] CanonicalXMLSerializer exceptions,
Elliotte Rusty Harold, 11/13/2003
-
Re: [XOM-interest] CanonicalXMLSerializer exceptions,
John Cowan, 11/13/2003
- Re: [XOM-interest] CanonicalXMLSerializer exceptions, Elliotte Rusty Harold, 11/13/2003
-
Re: [XOM-interest] CanonicalXMLSerializer exceptions,
John Cowan, 11/13/2003
-
Re: [XOM-interest] CanonicalXMLSerializer exceptions,
Elliotte Rusty Harold, 11/13/2003
-
Re: [XOM-interest] CanonicalXMLSerializer exceptions,
Janek Bogucki, 11/13/2003
-
Re: [XOM-interest] CanonicalXMLSerializer exceptions,
Nils_Kilden-Pedersen, 11/11/2003
Archive powered by MHonArc 2.6.24.