Класс 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
Все общие статические члены этого типа (Shared в 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.");
}
Безопасность многопоточности
Любые открытые статический (Shared в Visual Basic) элементы этого типа потокобезопасны. Потокобезопасность с элементами экземпляров не гарантируется.
См. также
.gif)
.gif)
.gif)
.gif)
.gif)