Поделиться через


Класс InvalidInputException

The InvalidInputException class is raised when validation of input data fails in the DAC package.

Иерархия наследования

System. . :: . .Object
  System. . :: . .Exception
    Microsoft.SqlServer.Management.Common. . :: . .SqlServerManagementException
      Microsoft.SqlServer.Management.Dac. . :: . .DacException
        Microsoft.SqlServer.Management.Dac..::..InvalidInputException

Пространство имен:  Microsoft.SqlServer.Management.Dac
Сборка:  Microsoft.SqlServer.Management.Dac (в Microsoft.SqlServer.Management.Dac.dll)

Синтаксис

'Декларация
<SerializableAttribute> _
Public NotInheritable Class InvalidInputException _
    Inherits DacException
'Применение
Dim instance As InvalidInputException
[SerializableAttribute]
public sealed class InvalidInputException : DacException
[SerializableAttribute]
public ref class InvalidInputException sealed : public DacException
[<SealedAttribute>]
[<SerializableAttribute>]
type InvalidInputException =  
    class
        inherit DacException
    end
public final class InvalidInputException extends DacException

Тип InvalidInputException обеспечивает доступ к следующим элементам.

Конструкторы

  Имя Описание
Открытый метод InvalidInputException(String) Initializes a new instance of the InvalidInputException class that has the specified message text.
Открытый метод InvalidInputException(String, Exception) Initializes a new instance of the InvalidInputException class that has the specified message text and inner exception.

В начало

Свойства

  Имя Описание
Открытое свойство DacExceptionType Gets the type of the exception. (Производный от DacException.)
Открытое свойство Data (Производный от Exception.)
Открытое свойство HelpLink Gets a string with the URL help link that further explains the exception. (Производный от DacException.)
Защищенное свойство HResult (Производный от Exception.)
Открытое свойство InnerException (Производный от Exception.)
Открытое свойство Message (Производный от Exception.)
Открытое свойство Source (Производный от Exception.)
Открытое свойство StackTrace (Производный от Exception.)
Открытое свойство TargetSite (Производный от Exception.)

В начало

Методы

  Имя Описание
Открытый метод Equals (Производный от Object.)
Защищенный метод Finalize (Производный от Object.)
Открытый метод GetBaseException (Производный от Exception.)
Открытый метод GetHashCode (Производный от Object.)
Открытый метод GetObjectData (Производный от Exception.)
Открытый метод GetType (Производный от Exception.)
Защищенный метод Init Initializes provider properties. (Производный от DacException.)
Защищенный метод MemberwiseClone (Производный от Object.)
Защищенный метод SetHelpContext Sets the help context for the help link. (Производный от DacException.)
Открытый метод ToString (Производный от Exception.)

В начало

Замечания

Using the InvalidInputException class, you can:

  • Handle errors generated by invalid input in the DAC namespace.

  • Determine the cause of the error.

Thread Safety

Все общие статические члены этого типа (Shared в Microsoft Visual Basic) можно использовать в многопоточных операциях. Безопасная многопоточная работа с членами экземпляров типа не гарантируется.

Примеры

VC#

try 
{ 
    //Enter Dac code here. 
 
} 
//Catch the invalid input exception.
catch (InvalidInputException iiex) 
{ 
    System.Console.WriteLine("This is a invalid input exception"); 
   //Display the exception message. 
   System.Console.WriteLine(iiex.Message); 
} 
   //Catch other exceptions. 
catch (Exception ex) 
{ 
   System.Console.WriteLine("This is another exception."); 
} 

Безопасность многопоточности

Любые открытые статический (Shared в Visual Basic) элементы этого типа потокобезопасны. Потокобезопасность с элементами экземпляров не гарантируется.