مشاركة عبر


SmoException Class

The SmoException class represents the exception that is raised when an error occurs during an SMO operation.

Inheritance Hierarchy

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

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

Syntax

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

The SmoException type exposes the following members.

Constructors

  Name Description
Public method SmoException() Initializes a new instance of the SmoException class.
Public method SmoException(String) Initializes a new instance of the SmoException class with the specified message.
Protected method SmoException(SerializationInfo, StreamingContext) Initializes a new instance of the SmoException class with the specified serialization information and streaming context.
Public method SmoException(String, Exception) Initializes a new instance of the SmoException class with the specified message and specified inner exception.

Top

Properties

  Name Description
Public property Data (Inherited from Exception.)
Public property HelpLink Gets the Help link for further information from Microsoft about the SMO exception. (Overrides Exception.HelpLink.)
Public property HResult (Inherited from Exception.)
Public property InnerException (Inherited from Exception.)
Public property Message (Inherited from Exception.)
Protected propertyStatic member ProdVer Gets the product version of the instance of SQL Server that generated the SMO exception.
Public property SmoExceptionType Gets the type of SMO exception.
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.)
Protected method Finalize (Inherited from Object.)
Public method GetBaseException (Inherited from Exception.)
Public method GetHashCode (Inherited from Object.)
Public method GetObjectData Security Critical. (Inherited from Exception.)
Public method GetType (Inherited from Exception.)
Protected method MemberwiseClone (Inherited from Object.)
Protected method SetHelpContext Sets the Help context value for the referenced exception.
Public method ToString (Inherited from Exception.)

Top

Events

  Name Description
Protected event SerializeObjectState (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

Inheritance Hierarchy

System.Object
  System.Exception
    Microsoft.SqlServer.Management.Common.SqlServerManagementException
      Microsoft.SqlServer.Management.Smo.SmoException
        Microsoft.SqlServer.Management.Smo.CollectionNotAvailableException
        Microsoft.SqlServer.Management.Smo.FailedOperationException
        Microsoft.SqlServer.Management.Smo.InternalSmoErrorException
        Microsoft.SqlServer.Management.Smo.InvalidRestorePlanException
        Microsoft.SqlServer.Management.Smo.InvalidScriptingOptionException
        Microsoft.SqlServer.Management.Smo.InvalidSmoOperationException
        Microsoft.SqlServer.Management.Smo.InvalidVersionSmoOperationException
        Microsoft.SqlServer.Management.Smo.MissingObjectException
        Microsoft.SqlServer.Management.Smo.PropertyCannotBeRetrievedException
        Microsoft.SqlServer.Management.Smo.PropertyNotSetException
        Microsoft.SqlServer.Management.Smo.PropertyReadOnlyException
        Microsoft.SqlServer.Management.Smo.PropertyTypeMismatchException
        Microsoft.SqlServer.Management.Smo.PropertyWriteException
        Microsoft.SqlServer.Management.Smo.ScriptWriterException
        Microsoft.SqlServer.Management.Smo.ServiceRequestException
        Microsoft.SqlServer.Management.Smo.SfcDependencyException
        Microsoft.SqlServer.Management.Smo.UnknownPropertyException
        Microsoft.SqlServer.Management.Smo.UnsupportedEngineTypeException
        Microsoft.SqlServer.Management.Smo.UnsupportedFeatureException
        Microsoft.SqlServer.Management.Smo.UnsupportedObjectNameException
        Microsoft.SqlServer.Management.Smo.UnsupportedVersionException
        Microsoft.SqlServer.Management.Smo.WrongPropertyValueException