HierarchyIdException Class

The exception that is thrown for invalid SqlHierarchyId values.

Inheritance Hierarchy


Namespace:  Microsoft.SqlServer.Types
Assembly:  Microsoft.SqlServer.Types (in Microsoft.SqlServer.Types.dll)


<SerializableAttribute> _
<CLSCompliantAttribute(True)> _
Public Class HierarchyIdException _
    Inherits Exception
Dim instance As HierarchyIdException
public class HierarchyIdException : Exception
public ref class HierarchyIdException : public Exception
type HierarchyIdException =  
        inherit Exception
public class HierarchyIdException extends Exception

The HierarchyIdException type exposes the following members.


  Name Description
Public method HierarchyIdException() Initializes a new instance of the HierarchyIdException class.
Public method HierarchyIdException(String) Initializes a new instance of the HierarchyIdException class with a custom error message.
Protected method HierarchyIdException(SerializationInfo, StreamingContext) Initializes a new instance of the HierarchyIdException class with serialized data.
Public method HierarchyIdException(String, Exception) Initializes a new instance of the HierarchyIdExceptionclass with a custom error message and the triggering exception object.



  Name Description
Public property Data (Inherited from Exception.)
Public property HelpLink (Inherited from Exception.)
Protected property HResult (Inherited from Exception.)
Public property InnerException (Inherited from Exception.)
Public property Message (Inherited from Exception.)
Public property Source (Inherited from Exception.)
Public property StackTrace (Inherited from Exception.)
Public property TargetSite (Inherited from Exception.)



  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetBaseException (Inherited from Exception.)
Public method GetHashCode (Inherited from Object.)
Public method GetObjectData (Inherited from Exception.)
Public method GetType (Inherited from Exception.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Exception.)



The HierarchyIdException exception is thrown when a value that is not a SqlHierarchyId type is passed to a method that expects a SqlHierarchyId type.

For more information, see Working with hierarchyid Data.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


Microsoft.SqlServer.Types Namespace