Class HResultException

  • All Implemented Interfaces:
    Serializable

    public class HResultException
    extends Exception
    Implements an Exception which represents an HRESULT value.
    Author:
    Lyubomir Marinov
    See Also:
    Serialized Form
    • Constructor Detail

      • HResultException

        public HResultException​(int hresult)
        Initializes a new HResultException which is to represent a specific HRESULT value. The detail message of the new instance is derived from the the specified HRESULT value.
        Parameters:
        hresult - the HRESULT value to be represented by the new instance
      • HResultException

        public HResultException​(int hresult,
                                String message)
        Initializes a new HResultException which is to represent a specific HRESULT value and have a specific detail message.
        Parameters:
        hresult - the HRESULT value to be represented by the new instance
        message - the detail message to initialize the new instance with
    • Method Detail

      • getHResult

        public int getHResult()
        Gets the HRESULT value represented by this instance.
        Returns:
        the HRESULT value represented by this instance
      • toString

        public static String toString​(int hresult)
        Returns a String representation of a specific HRESULT value.
        Parameters:
        hresult - the HRESULT value of which a String representation is to be returned
        Returns:
        a String representation of the specified hresult