public class ComException extends RuntimeException
Calling a wrapped COM method throws this exception when the underlying COM method returns a failure HRESULT code.
Constructor and Description |
---|
ComException(ComException cause)
Constructs a new ComException with the given ComExcepton as cause.
|
ComException(String msg,
int hresult)
Constructs a new ComException with the given values
|
ComException(String msg,
int hresult,
String fileName,
int line)
Constructs a new ComException with the given values
|
ComException(String msg,
String fileName,
int line)
Constructs a new ComException with the given values.
|
Modifier and Type | Method and Description |
---|---|
String |
getDetailMessage()
Returns the message of the superclass
|
ErrorInfo |
getErrorInfo()
Gets the
ErrorInfo object associated with this error. |
int |
getHRESULT()
Returns the HRESULT value of this error.
|
String |
getMessage() |
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public ComException(String msg, int hresult, String fileName, int line)
msg
- the message text of the Exceptionhresult
- the HRESULT value of the COM errorfileName
- the file name of the source where the error occurredline
- the line in the file where the error occurredpublic ComException(String msg, String fileName, int line)
msg
- the message text of the ExceptionfileName
- the file name of the source where the error occurredline
- the line in the file where the error occurredpublic ComException(String msg, int hresult)
msg
- the message text of the Exceptionhresult
- the HRESULT value of the COM errorpublic ComException(ComException cause)
cause
- the line in the file where the error occurredpublic ErrorInfo getErrorInfo()
ErrorInfo
object associated with this error.
Some COM objects can report additional error information beyond
simple HRESULT value. If an error came from such an COM object,
this method returns a non-null value, and you can query the returned
ErrorInfo
object for more information about the error.
public int getHRESULT()
public String getMessage()
getMessage
in class Throwable
public String getDetailMessage()
Copyright © 2014. All rights reserved.