Classe DacException
The DacException class is a generic exception that is raised when an error occurs using the Microsoft.SqlServer.Management.Dac namespace.
Gerarchia di ereditarietà
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
Spazio dei nomi Microsoft.SqlServer.Management.Dac
Assembly: Microsoft.SqlServer.Management.Dac (in Microsoft.SqlServer.Management.Dac.dll)
Sintassi
'Dichiarazione
<SerializableAttribute> _
Public Class DacException _
Inherits SqlServerManagementException
'Utilizzo
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
Nel tipo DacException sono esposti i membri seguenti.
Costruttori
Nome | Descrizione | |
---|---|---|
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. |
In alto
Proprietà
Nome | Descrizione | |
---|---|---|
DacExceptionType | Gets the type of the exception. | |
Data | Ereditato da Exception. | |
HelpLink | Gets a string with the URL help link that further explains the exception. Esegue l'override di Exception. . :: . .HelpLink. | |
HResult | Ereditato da Exception. | |
InnerException | Ereditato da Exception. | |
Message | Ereditato da Exception. | |
ProdVer | Gets the product version. | |
Source | Ereditato da Exception. | |
StackTrace | Ereditato da Exception. | |
TargetSite | Ereditato da Exception. |
In alto
Metodi
Nome | Descrizione | |
---|---|---|
Equals | Ereditato da Object. | |
Finalize | Ereditato da Object. | |
GetBaseException | Ereditato da Exception. | |
GetHashCode | Ereditato da Object. | |
GetObjectData | Ereditato da Exception. | |
GetType | Ereditato da Exception. | |
Init | Initializes provider properties. | |
MemberwiseClone | Ereditato da Object. | |
SetHelpContext | Sets the help context for the help link. | |
ToString | Ereditato da Exception. |
In alto
Osservazioni
Using the DacException class, you can:
Handle errors generated by the Microsoft.SqlServer.Management.Dac namespace.
Determine the cause of the error.
Thread Safety
Tutti i membri statici pubblici (Shared in Microsoft Visual Basic) di questo tipo sono sicuri per le operazioni a thread multipli. Non è invece garantita la sicurezza dei membri dell'istanza.
Esempi
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.");
}
Protezione dei thread
I membri static (Shared in Visual Basic) pubblici di questo tipo sono affidabili. Non è invece garantita la sicurezza dei membri dell'istanza.
Vedere anche