BindException Class

Indicates that an error occurred during XML deserialization, binding, or configuration validation.

C#
public sealed class BindException : Exception
Inheritance
BindException
Implements

Remarks

This exception is thrown when Oxbind fails to bind XML data to a target class, for example, when the XML structure does not match the expected schema defined by the constructor parameters of the target class.

Constructors

BindException()

Initializes a new instance of the BindException class.

BindException(string)

Initializes a new instance of the BindException class, with the specified detail message.

BindException(string, Exception)

Initializes a new instance of the BindException class, with the specified detail message and cause.

BindException(string, IXmlLineInfo)

Initializes a new instance of the BindException class, with the specified detail message and the specified location.

BindException(string, Exception, IXmlLineInfo)

Initializes a new instance of the BindException class, with the specified detail message and cause.

Properties

LineInfo

Gets the line information.

Data (Inherited from Exception)
HelpLink (Inherited from Exception)
HResult (Inherited from Exception)
InnerException (Inherited from Exception)
Message (Inherited from Exception)
Source (Inherited from Exception)
StackTrace (Inherited from Exception)
TargetSite (Inherited from Exception)

Methods

GetFullMessage()

Gets the message with the location information.

GetBaseException() (Inherited from Exception)
GetObjectData(SerializationInfo, StreamingContext) (Inherited from Exception)
GetType() (Inherited from Exception)
ToString() (Inherited from Exception)
Equals(object) (Inherited from object)
GetHashCode() (Inherited from object)
GetType() (Inherited from object)
MemberwiseClone() (Inherited from object)

Constructors Detail

BindException()

Initializes a new instance of the BindException class.

C#
public BindException()

Remarks

The LineInfo property is initialized to represent no line information.

BindException(string)

Initializes a new instance of the BindException class, with the specified detail message.

C#
public BindException(string message)

Parameters

message
string

The detail message.

Remarks

The LineInfo property is initialized to represent no line information.

BindException(string, Exception)

Initializes a new instance of the BindException class, with the specified detail message and cause.

C#
public BindException(string message, Exception innerException)

Parameters

message
string

The detail message.

innerException
Exception

The cause.

Remarks

The LineInfo property is initialized to represent no line information.

BindException(string, IXmlLineInfo)

Initializes a new instance of the BindException class, with the specified detail message and the specified location.

C#
public BindException(string message, IXmlLineInfo info)

Parameters

message
string

The detail message.

info
IXmlLineInfo

The line information.

BindException(string, Exception, IXmlLineInfo)

Initializes a new instance of the BindException class, with the specified detail message and cause.

C#
public BindException(string message, Exception innerException, IXmlLineInfo info)

Parameters

message
string

The detail message.

innerException
Exception

The cause.

info
IXmlLineInfo

The line information.

Properties Detail

LineInfo

Gets the line information.

C#
public IXmlLineInfo LineInfo { get; }

Property Value

Methods Detail

GetFullMessage()

Gets the message with the location information.

C#
public string GetFullMessage()

Returns

The string representation.

Remarks

This method returns a string in the format "Line:Column:Message" if LineInfo contains line information (i.e., IXmlLineInfo.HasLineInfo() returns true), otherwise it returns the same as Exception.Message.