FailedOperationException Class

The FailedOperationException class represents the exception raised when an operation fails. Failed database operations include CREATE, DROP, ALTER, SCRIPT, REFRESH, RENAME. This exception can also be raised when some of the public methods in SMO fail.

Inheritance Hierarchy

System.Object
  System.Exception
    Microsoft.SqlServer.Management.Common.SqlServerManagementException
      Microsoft.SqlServer.Management.Smo.SmoException
        Microsoft.SqlServer.Management.Smo.FailedOperationException

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public NotInheritable Class FailedOperationException _
    Inherits SmoException
'Usage
Dim instance As FailedOperationException
[SerializableAttribute]
public sealed class FailedOperationException : SmoException
[SerializableAttribute]
public ref class FailedOperationException sealed : public SmoException
[<SealedAttribute>]
[<SerializableAttribute>]
type FailedOperationException =  
    class 
        inherit SmoException 
    end
public final class FailedOperationException extends SmoException

The FailedOperationException type exposes the following members.

Constructors

  Name Description
Public method FailedOperationException() Initializes a new instance of the FailedOperationException class.
Public method FailedOperationException(String) Initializes a new instance of the FailedOperationException class that has the specified message.
Public method FailedOperationException(String, Exception) Initializes a new instance of the FailedOperationException class that has the specified message and inner exception.
Public method FailedOperationException(String, Object, Exception) Initializes a new instance of the FailedOperationException class with the specified object on which the specified operation failed and that has the specified inner exception.
Public method FailedOperationException(String, Object, Exception, String) Initializes a new instance of the FailedOperationException class that has the specified object on which the specified operation failed, and that has the specified inner exception and reason for occurring.

Top

Properties

  Name Description
Public property Data (Inherited from Exception.)
Public property FailedObject Gets or sets the object on which the operation failed.
Public property HelpLink Gets the Help link for further information from Microsoft about the SMO exception. (Inherited from SmoException.)
Public property HResult (Inherited from Exception.)
Public property InnerException (Inherited from Exception.)
Public property Message Gets the message text that explains the exception. (Overrides Exception.Message.)
Public property Operation Gets or sets the operation that failed.
Public property SmoExceptionType Gets the exception type. (Overrides SmoException.SmoExceptionType.)
Public property Source (Inherited from Exception.)
Public property StackTrace (Inherited from Exception.)
Public property TargetSite (Inherited from Exception.)

Top

Methods

  Name Description
Public method Equals (Inherited from Object.)
Public method GetBaseException (Inherited from Exception.)
Public method GetHashCode (Inherited from Object.)
Public method GetObjectData Override based on the virtual SerializationInfo method GetObjectData. (Overrides Exception.GetObjectData(SerializationInfo, StreamingContext).)
Public method GetType (Inherited from Exception.)
Protected method SetHelpContext Sets the Help context value for the referenced exception. (Inherited from SmoException.)
Public method ToString (Inherited from Exception.)

Top

Remarks

Thread Safety

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

Examples

Handling SMO Exceptions

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

Microsoft.SqlServer.Management.Smo Namespace