DacException 類別
The DacException class is a generic exception that is raised when an error occurs using the Microsoft.SqlServer.Management.Dac namespace.
繼承階層
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
命名空間: Microsoft.SqlServer.Management.Dac
組件: Microsoft.SqlServer.Management.Dac (在 Microsoft.SqlServer.Management.Dac.dll 中)
語法
'宣告
<SerializableAttribute> _
Public Class DacException _
Inherits SqlServerManagementException
'用途
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
DacException 型別公開下列成員。
建構函式
| 名稱 | 說明 | |
|---|---|---|
![]() |
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. |
上層
屬性
| 名稱 | 說明 | |
|---|---|---|
![]() |
DacExceptionType | Gets the type of the exception. |
![]() |
Data | (繼承自 Exception。) |
![]() |
HelpLink | Gets a string with the URL help link that further explains the exception. (覆寫 Exception. . :: . .HelpLink。) |
![]() |
HResult | (繼承自 Exception。) |
![]() |
InnerException | (繼承自 Exception。) |
![]() |
Message | (繼承自 Exception。) |
![]() ![]() |
ProdVer | Gets the product version. |
![]() |
Source | (繼承自 Exception。) |
![]() |
StackTrace | (繼承自 Exception。) |
![]() |
TargetSite | (繼承自 Exception。) |
上層
方法
| 名稱 | 說明 | |
|---|---|---|
![]() |
Equals | (繼承自 Object。) |
![]() |
Finalize | (繼承自 Object。) |
![]() |
GetBaseException | (繼承自 Exception。) |
![]() |
GetHashCode | (繼承自 Object。) |
![]() |
GetObjectData | (繼承自 Exception。) |
![]() |
GetType | (繼承自 Exception。) |
![]() |
Init | Initializes provider properties. |
![]() |
MemberwiseClone | (繼承自 Object。) |
![]() |
SetHelpContext | Sets the help context for the help link. |
![]() |
ToString | (繼承自 Exception。) |
上層
備註
Using the DacException class, you can:
Handle errors generated by the Microsoft.SqlServer.Management.Dac namespace.
Determine the cause of the error.
Thread Safety
此型別的任何公用靜態 (在 Microsoft Visual Basic 為共用) 成員具備多執行緒作業安全。不保證所有執行個體成員都是安全執行緒。
範例
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.");
}
執行緒安全性
這個型別的任何公用 static (在 Visual Basic 中為 Shared) 成員都是執行緒安全的。並不是所有的執行個體成員都保證可以用於所有的執行緒。
.gif)
.gif)
.gif)
.gif)
.gif)