
Exception handling - how to know which exceptions are thrown
The docs are actually fairly complete when it comes to
exceptions. In the example you are giving, if you mean
validating against a schema or DTD, then load doesn't do
this. All load does is load the document into memory,
making sure it is well formed xml. If it isn't then it
raises XmlException. If you want to validate the document
against a schema, then you will need to use the
XmlValidatingReader class.
Quote:
>-----Original Message-----
>hey folks,
>How do I know which exceptions may be thrown when
invoking some method? .NET
Quote:
>docs lack this kind of info...as an example the method
Load() from
>XmlDocument class does not says anything about what
happens when the
>"contract rules" are broken!
>Where should I look for such info?
>.