Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

XmlReaderContext.ReportException(XmlNode, String, String, Exception) Method

Reports a parse error by loading a ObjectsException with helpful contextual information and throwing said exception.

[Visual Basic]
Public Overridable Overloads Sub ReportException( _
   ByVal node As XmlNode, _
   ByVal name As String, _
   ByVal message As String, _
   ByVal cause As Exception _
)
[C#]
public virtual void ReportException(
   XmlNode node,
   string name,
   string message,
   Exception cause
);

Parameters

node
The node that triggered the parse error.
name
The name of the object that triggered the exception.
message
A message about the error.
cause
The root cause of the parse error (if any - may be a null reference (Nothing in Visual Basic)).

Remarks

Derived classes can of course override this method in order to implement validators capable of displaying a full list of errors found in the definition.

Exceptions

Exception Type Condition
ObjectsException Always throws an instance of this exception class, that will contain helpful contextual infomation about the parse error.

See Also

XmlReaderContext Class | Spring.Objects.Factory.Xml Namespace | XmlReaderContext.ReportException Overload List