Package com.sun.jna.platform.win32.COM
Class COMException
- java.lang.Object
- 
- java.lang.Throwable
- 
- java.lang.Exception
- 
- java.lang.RuntimeException
- 
- com.sun.jna.platform.win32.COM.COMException
 
 
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable
 - Direct Known Subclasses:
- COMInvokeException
 
 public class COMException extends java.lang.RuntimeExceptionException class for all COM related classes.- Author:
- Tobias Wolf, wolf.tobias@gmx.net
- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description COMException()Instantiates a new automation exception.COMException(java.lang.String message)Instantiates a new automation exception.COMException(java.lang.String message, WinNT.HRESULT hresult)Instantiates a new automation exception.COMException(java.lang.String message, java.lang.Throwable cause)Instantiates a new automation exception.COMException(java.lang.Throwable cause)Instantiates a new automation exception.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description WinNT.HRESULTgetHresult()booleanmatchesErrorCode(int errorCode)
 
- 
- 
- 
Constructor Detail- 
COMExceptionpublic COMException() Instantiates a new automation exception.
 - 
COMExceptionpublic COMException(java.lang.String message) Instantiates a new automation exception.- Parameters:
- message- the message
 
 - 
COMExceptionpublic COMException(java.lang.Throwable cause) Instantiates a new automation exception.- Parameters:
- cause- the cause
 
 - 
COMExceptionpublic COMException(java.lang.String message, java.lang.Throwable cause)Instantiates a new automation exception.- Parameters:
- message- the message
- cause- the cause
 
 - 
COMExceptionpublic COMException(java.lang.String message, WinNT.HRESULT hresult)Instantiates a new automation exception.- Parameters:
- message- the message
- hresult- HRESULT that lead to the creation of the COMException
 
 
- 
 - 
Method Detail- 
getHresultpublic WinNT.HRESULT getHresult() - Returns:
- the HRESULT that lead to thie COMException or NULL if the COMException as not directly caused by a native call
 
 - 
matchesErrorCodepublic boolean matchesErrorCode(int errorCode) - Parameters:
- errorCode-
- Returns:
- true if the exception has an associated HRESULT and that HRESULT matches the supplied error code
 
 
- 
 
-