DacException-Klasse
The DacException class is a generic exception that is raised when an error occurs using the Microsoft.SqlServer.Management.Dac namespace.
Vererbungshierarchie
System. . :: . .Object
System. . :: . .Exception
Microsoft.SqlServer.Management.Common. . :: . .SqlServerManagementException
Microsoft.SqlServer.Management.Dac..::..DacException
Microsoft.SqlServer.Management.Dac. . :: . .DacExtractionException
Microsoft.SqlServer.Management.Dac. . :: . .DeploymentValidationException
Microsoft.SqlServer.Management.Dac. . :: . .ExtractValidationException
Microsoft.SqlServer.Management.Dac. . :: . .InvalidInputException
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 | |
---|---|---|
DacException() () () () | Initializes a new instance of the DacException class. | |
DacException(String) | Initializes a new instance of the DacException class that has the specified message text. | |
DacException(SerializationInfo, StreamingContext) | Initializes a new instance of the DacException class specifying a location to stream serialized information. | |
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 | |
---|---|---|
DacExceptionType | Gets the type of the exception. | |
Data | (Geerbt von Exception.) | |
HelpLink | Gets a string with the URL help link that further explains the exception. (Überschreibt Exception. . :: . .HelpLink.) | |
HResult | (Geerbt von Exception.) | |
InnerException | (Geerbt von Exception.) | |
Message | (Geerbt von Exception.) | |
ProdVer | Gets the product version. | |
Source | (Geerbt von Exception.) | |
StackTrace | (Geerbt von Exception.) | |
TargetSite | (Geerbt von Exception.) |
Zum Anfang
Methoden
Name | Beschreibung | |
---|---|---|
Equals | (Geerbt von Object.) | |
Finalize | (Geerbt von Object.) | |
GetBaseException | (Geerbt von Exception.) | |
GetHashCode | (Geerbt von Object.) | |
GetObjectData | (Geerbt von Exception.) | |
GetType | (Geerbt von Exception.) | |
Init | Initializes provider properties. | |
MemberwiseClone | (Geerbt von Object.) | |
SetHelpContext | Sets the help context for the help link. | |
ToString | (Geerbt von Exception.) |
Zum Anfang
Hinweise
Using the DacException class, you can:
Handle errors generated by the Microsoft.SqlServer.Management.Dac namespace.
Determine the cause of the error.
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.
Siehe auch