DacException-Klasse

The DacException class is a generic exception that is raised when an error occurs using the Microsoft.SqlServer.Management.Dac namespace.

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

Syntax

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

Der DacException-Typ macht folgende Elemente verfügbar.

Konstruktoren

  Name Beschreibung
Öffentliche Methode DacException() () () () Initializes a new instance of the DacException class.
Öffentliche Methode DacException(String) Initializes a new instance of the DacException class that has the specified message text.
Geschützte Methode DacException(SerializationInfo, StreamingContext) Initializes a new instance of the DacException class specifying a location to stream serialized information.
Öffentliche Methode DacException(String, Exception) Initializes a new instance of the DacException class that has the specified message text and inner exception.

Zum Anfang

Eigenschaften

  Name Beschreibung
Öffentliche Eigenschaft DacExceptionType Gets the type of the exception.
Öffentliche Eigenschaft Data (Geerbt von Exception.)
Öffentliche Eigenschaft HelpLink Gets a string with the URL help link that further explains the exception. (Überschreibt Exception. . :: . .HelpLink.)
Geschützte Eigenschaft HResult (Geerbt von Exception.)
Öffentliche Eigenschaft InnerException (Geerbt von Exception.)
Öffentliche Eigenschaft Message (Geerbt von Exception.)
Geschützte EigenschaftStatisches Element ProdVer Gets the product version.
Öffentliche Eigenschaft Source (Geerbt von Exception.)
Öffentliche Eigenschaft StackTrace (Geerbt von Exception.)
Öffentliche Eigenschaft TargetSite (Geerbt von Exception.)

Zum Anfang

Methoden

  Name Beschreibung
Öffentliche Methode Equals (Geerbt von Object.)
Geschützte Methode Finalize (Geerbt von Object.)
Öffentliche Methode GetBaseException (Geerbt von Exception.)
Öffentliche Methode GetHashCode (Geerbt von Object.)
Öffentliche Methode GetObjectData (Geerbt von Exception.)
Öffentliche Methode GetType (Geerbt von Exception.)
Geschützte Methode Init Initializes provider properties.
Geschützte Methode MemberwiseClone (Geerbt von Object.)
Geschützte Methode SetHelpContext Sets the help context for the help link.
Öffentliche Methode ToString (Geerbt von Exception.)

Zum Anfang

Hinweise

Using the DacException class, you can:

Thread Safety

Alle öffentlichen, statischen Elemente dieses Typs (Shared in Microsoft Visual Basic) sind für Vorgänge mit mehreren Threads sicher. Für Instanzelemente kann nicht sichergestellt werden, dass sie für Threads sicher sind.

Beispiele

VC#

try 
{ 
    //Enter DAC code here. 
 
} 
//Catch the DAC exception.
catch (DacException dacex) 
{ 
    System.Console.WriteLine("This is a DAC Exception"); 
   //Display the DAC exception message and type. 
   System.Console.WriteLine(dacex.Message); 
   System.Console.WriteLine(dacex.DacExceptionType); 
} 
   //Catch other non-DAC exceptions. 
catch (Exception ex) 
{ 
   System.Console.WriteLine("This is not a DAC exception."); 
} 

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic)-Elemente dieses Typs sind Threadsicher. Für Instanzelemente wird die Threadsicherheit nicht gewährleistet.