Class ContentNotFoundException

Thrown when a ContentData cannot be found.

Inheritance
System.Object
System.Exception
ContentNotFoundException
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.InteropServices._Exception
Inherited Members
System.Exception.GetBaseException()
System.Exception.ToString()
System.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
System.Exception.GetType()
System.Exception.Data
System.Exception.InnerException
System.Exception.TargetSite
System.Exception.StackTrace
System.Exception.HelpLink
System.Exception.Source
System.Exception.HResult
System.Exception.SerializeObjectState
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
public class ContentNotFoundException : EPiServerException, ISerializable, _Exception
Remarks

This exception is commonly thrown when you are accessing a content that does not exist using IContentRepository. For debugging scenarios you can use the ContentLink property for the source page of an exception.

Constructors

ContentNotFoundException()

Initializes a new instance of the ContentNotFoundException class for a given content instance that was not found.

Declaration
public ContentNotFoundException()

ContentNotFoundException(ContentReference)

Initializes a new instance of the ContentNotFoundException class for a given content instance that was not found.

Declaration
public ContentNotFoundException(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The content link.

ContentNotFoundException(Guid)

Initializes a new instance of the ContentNotFoundException class for a given content instance GUID that was not found.

Declaration
public ContentNotFoundException(Guid contentGuid)
Parameters
Type Name Description
System.Guid contentGuid

The content GUID.

ContentNotFoundException(SerializationInfo, StreamingContext)

Initializes a new instance of the ContentNotFoundException class with serialized data.

Declaration
protected ContentNotFoundException(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info

The object that holds the serialized object data.

System.Runtime.Serialization.StreamingContext context

The contextual information about the source or destination.

ContentNotFoundException(String)

Initializes a new instance of the ContentNotFoundException class for a given content instance that was not found.

Declaration
public ContentNotFoundException(string errorMessage)
Parameters
Type Name Description
System.String errorMessage

ContentNotFoundException(String, Exception)

Initializes the new instance of ContentNotFoundException

Declaration
public ContentNotFoundException(string message, Exception innerException)
Parameters
Type Name Description
System.String message

The error message that explains the reason for the exception.

System.Exception innerException

The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.

Properties

ContentGuid

Gets the content GUID.

Declaration
public Guid ContentGuid { get; set; }
Property Value
Type Description
System.Guid

The content GUID.

Gets the content link.

Declaration
public ContentReference ContentLink { get; set; }
Property Value
Type Description
ContentReference

The content link.

Implements

System.Runtime.Serialization.ISerializable
System.Runtime.InteropServices._Exception

Extension Methods