Share via


SPException Class

Represents an exception in Windows SharePoint Services.

Inheritance Hierarchy

System.Object
  System.Exception
    System.ApplicationException
      Microsoft.SharePoint.SPException
        Microsoft.SharePoint.SPContentTypeReadOnlyException
        Microsoft.SharePoint.SPContentTypeSealedException
        Microsoft.SharePoint.SPDistributionGroupException
        Microsoft.SharePoint.SPFieldValidationException
        Microsoft.SharePoint.SPInvalidPropertyException
        Microsoft.SharePoint.WebPartPages.DataSourceControlDisabledException

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

<SerializableAttribute> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public Class SPException _
    Inherits ApplicationException

Dim instance As SPException
[SerializableAttribute]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public class SPException : ApplicationException

Remarks

The SPException class is generally used to indicate a violation of a requirement in Windows SharePoint Services. For example, attempting to delete the site template gallery creates an exception.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SPException Members

Microsoft.SharePoint Namespace