Class InvalidContentException
Thrown when errors are encountered in content during processing.
[Serializable]
public class InvalidContentException : Exception, ISerializable
- Inheritance
-
InvalidContentException
- Implements
- Inherited Members
Constructors
InvalidContentException()
Initializes a new instance of the InvalidContentException class
public InvalidContentException()
InvalidContentException(SerializationInfo, StreamingContext)
Initializes a new instance of the InvalidContentException class with information on serialization and streaming context for the related content item.
protected InvalidContentException(SerializationInfo serializationInfo, StreamingContext streamingContext)
Parameters
serializationInfo
SerializationInfoInformation necessary for serialization and deserialization of the content item.
streamingContext
StreamingContextInformation necessary for the source and destination of a given serialized stream. Also provides an additional caller-defined context.
InvalidContentException(string)
Initializes a new instance of the InvalidContentException class with the specified error message.
public InvalidContentException(string message)
Parameters
message
stringA message that describes the error.
InvalidContentException(string, ContentIdentity)
Initializes a new instance of the InvalidContentException class with the specified error message and the identity of the content throwing the exception.
public InvalidContentException(string message, ContentIdentity contentIdentity)
Parameters
message
stringA message that describes the error.
contentIdentity
ContentIdentityInformation about the content item that caused this error, including the file name. In some cases, a location within the file (of the problem) is specified.
InvalidContentException(string, ContentIdentity, Exception)
Initializes a new instance of the InvalidContentException class with the specified error message, the identity of the content throwing the exception, and a reference to the inner exception that is the cause of this exception.
public InvalidContentException(string message, ContentIdentity contentIdentity, Exception innerException)
Parameters
message
stringA message that describes the error.
contentIdentity
ContentIdentityInformation about the content item that caused this error, including the file name. In some cases, a location within the file (of the problem) is specified.
innerException
ExceptionThe exception that is the cause of the current exception. If innerException is not a null reference, the current exception is raised in a catch block that handles the inner exception.
InvalidContentException(string, Exception)
Initializes a new instance of the InvalidContentException class with the specified error message and a reference to the inner exception that is the cause of this exception.
public InvalidContentException(string message, Exception innerException)
Parameters
message
stringA message that describes the error.
innerException
ExceptionThe exception that is the cause of the current exception. If innerException is not a null reference, the current exception is raised in a catch block that handles the inner exception.
Properties
ContentIdentity
Gets or sets the identity of the content item that caused the exception.
public ContentIdentity ContentIdentity { get; set; }