Class DataApplicationException
Represents the exception that is thrown when error information is availible in a DataSet.
Inheritance
Inherited Members
Namespace: IRM.Data
Assembly: IRM.dll
Syntax
[Serializable]
public class DataApplicationException : ApplicationException, ISerializable, _Exception
Constructors
DataApplicationException()
Initializes a new instance of the DataApplicationException class.
Declaration
public DataApplicationException()
DataApplicationException(DataSet)
Initializes a new instance of the DataApplicationException class with a reference to the DataSet which contains more error information.
Declaration
public DataApplicationException(DataSet dataSet)
Parameters
System.Data.DataSet
dataSet
The DataSet that contains error information. |
DataApplicationException(SerializationInfo, StreamingContext)
Initializes a new instance of the DataApplicationException class with serialized data.
Declaration
protected DataApplicationException(SerializationInfo info, StreamingContext context)
Parameters
SerializationInfo
info
The object that holds the serialized object data. |
StreamingContext
context
The contextual information about the source or destination. |
Remarks
This constructor is called during deserialization to reconstitute the exception object transmitted over a stream.
DataApplicationException(String)
Initializes a new instance of the DataApplicationException class with a specified error message.
Declaration
public DataApplicationException(string message)
Parameters
String
message
The error message that explains the reason for the exception. |
Remarks
The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
DataApplicationException(String, DataSet)
Initializes a new instance of the DataApplicationException class with a specified error message and a reference to the DataSet which contains more error information.
Declaration
public DataApplicationException(string message, DataSet dataSet)
Parameters
String
message
The error message that explains the reason for the exception. |
System.Data.DataSet
dataSet
The DataSet that contains error information. |
DataApplicationException(String, IDbCommand)
Initializes a new instance of the DataApplicationException class with a specified error message.
The exception is also filled with information from the dbCommand
object that was used in the query against the data source.
Declaration
public DataApplicationException(string message, IDbCommand dbCommand)
Parameters
String
message
The error message that explains the reason for the exception. |
System.Data.IDbCommand
dbCommand
The System.Data.IDbCommand that was used in the query against the data source. |
Remarks
The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
DataApplicationException(String, Exception)
Initializes a new instance of the DataApplicationException class with a specified error message and a reference to the inner exception that is the cause of this exception.
Declaration
public DataApplicationException(string message, Exception innerException)
Parameters
String
message
The error message that explains the reason for the exception. |
Exception
innerException
The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception. |
Remarks
The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or a null reference if the InnerException property does not supply the inner exception value to the constructor.
DataApplicationException(String, Exception, DataSet)
Initializes a new instance of the DataApplicationException class with a specified error message, a reference to the inner exception that is the cause of this exception and a reference to the DataSet which contains more error information.
Declaration
public DataApplicationException(string message, Exception innerException, DataSet dataSet)
Parameters
String
message
The error message that explains the reason for the exception. |
Exception
innerException
The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception. |
System.Data.DataSet
dataSet
The DataSet that contains error information. |
Remarks
The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or a null reference if the InnerException property does not supply the inner exception value to the constructor.
DataApplicationException(String, Exception, DataSet, IDbCommand)
Initializes a new instance of the DataApplicationException class with a specified error message, a reference to the inner exception that is the cause of this exception and a reference to the System.Data.DataSet which contains more error information.
The exception is also filled with information from the dbCommand
object that was used in the query against the data source.
Declaration
public DataApplicationException(string message, Exception innerException, DataSet dataSet, IDbCommand dbCommand)
Parameters
String
message
The error message that explains the reason for the exception. |
Exception
innerException
The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception. |
System.Data.DataSet
dataSet
The System.Data.DataSet that contains error information. |
System.Data.IDbCommand
dbCommand
The System.Data.Common.DbCommand that was used in the query against the data source. |
Remarks
The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or a null reference if the InnerException property does not supply the inner exception value to the constructor.
DataApplicationException(String, Exception, IDbCommand)
Initializes a new instance of the DataApplicationException class with a specified error message and a reference to the inner exception that is the cause of this exception.
The exception is also filled with information from the dbCommand
object that was used in the query against the data source.
Declaration
public DataApplicationException(string message, Exception innerException, IDbCommand dbCommand)
Parameters
String
message
The error message that explains the reason for the exception. |
Exception
innerException
The exception that is the cause of the current exception. If the innerException parameter is not a null reference, the current exception is raised in a catch block that handles the inner exception. |
System.Data.IDbCommand
dbCommand
The System.Data.IDbCommand that was used in the query against the data source. |
Remarks
The content of the message parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the InnerException property. The InnerException property returns the same value that is passed into the constructor, or a null reference if the InnerException property does not supply the inner exception value to the constructor.
Properties
DataSet
Gets the DataSet that contains error information.
Declaration
public DataSet DataSet { get; }
Property Value
System.Data.DataSet
The DataSet that contains error information. |
DataSetErrorInfo
Declaration
public ErrorInfo DataSetErrorInfo { get; }
Property Value
ErrorInfo
The ErrorInfo object that contains information of the constraints in the DataSet object. |
DataSetXml
Gets the System.Xml.XmlElement object that contains error information extracted from the DataSet.
Declaration
public XmlElement DataSetXml { get; }
Property Value
System.Xml.XmlElement
The System.Xml.XmlElement object that contains error information extracted from the DataSet. |
DbCommandInfo
Gets the DbCommandInfo object that contains information from the System.Data.IDbCommand object that was used in the query against the data source.
Declaration
public DbCommandInfo DbCommandInfo { get; }
Property Value
DbCommandInfo
The DbCommandInfo object that contains information from the System.Data.IDbCommand object that was used in the query against the data source. |
Message
Gets a message that describes the current exception.
Declaration
public override string Message { get; }
Property Value
String
The error message that explains the reason for the exception, or an empty string(""). |
Overrides
Remarks
The text of Message should completely describe the error and should, when possible, explain how to correct it. The value of the Message property is included in the information returned by System.Exception.ToString().
The Message property is set only when creating an BusinessRuleException. If no message was supplied to the constructor for the current instance, the system supplies a default message that is formatted using the current system culture.
The error message should be localized.
Methods
GetObjectData(SerializationInfo, StreamingContext)
When overridden in a derived class, sets the SerializationInfo with information about the exception.
Declaration
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
SerializationInfo
info
The object that holds the serialized object data. |
StreamingContext
context
The contextual information about the source or destination. |
Overrides
Remarks
GetObjectData sets a SerializationInfo with all the exception object data targeted for serialization. During deserialization, the exception is reconstituted from the SerializationInfo transmitted over the stream.
ToHtml()
Returns the Message as HTML.
Declaration
public string ToHtml()
Returns
String
The string that represents the message in HTML |