Re: [Saxdotnet-devel] Changing Exceptions in the API
Brought to you by:
jeffrafter,
kwaclaw
From: Karl W. <ka...@wa...> - 2004-12-12 16:45:07
|
Karl Waclawek wrote: > > In any case, the fact that the ArgumentException in .NET has > a field for the parameter's name should be sufficient to make > that distinction. If it refers to the feature's name then we have > the equivalent of a SAXNotRecognizedException, if it refers to the > value, then this is equivalent to a SAXNotSupportedException. To summarize: how would this look then in the API: * bool IXmlReader.GetFeature(name) - ArgumentException(name) means: not recognized - NotSupportedException means: this feature cannot be read (right now) * void IXmlReader.SetFeature(name, value) - ArgumentException(name) means: not recognized - ArgumentException(value) means: value not supported (right now) - NotSupportedException mans: this feature cannot be set (right now) * IProperty IXmlReader.GetProperty(name) - ArgumentException(name) means: not recognized - NotSupportedException: this exception makes no sense here * object IProperty.Value { get; } - NotSupportedException means: the value cannot be read (right now); unlikely to happen * object IProperty.Value { set; } - ArgumentException(value) means: value not supported (right now) - NotSupportedException means: the value cannot be set (right now) If the above makes sense then we can rely on built-in exceptions for feature and property access. Karl |