Class ComSuccessException
public class ComSuccessException extends ComException
{
// Constructors
public ComSuccessException(int hr);
public ComSuccessException(int hr, String message);
public ComSuccessException(int hr, String source,
String helpFile, int helpContext);
public ComSuccessException(int hr, String description,
String source, String helpFile, int helpContext);
public ComSuccessException();
public ComSuccessException(String message);
}
This class wraps an HRESULT, the return type used in most methods in the Component Object Model (COM). In a ComSuccessException object, the default value of the stored HRESULT is S_FALSE (0x00000001L). This value indicates the successful completion of a method that returns a boolean value of false.
Note To return an S_OK value when implementing a COM method in Java, code the method to return as it normally would. No special code is required.
RuntimeException
|
+--ComException
|
+--ComSuccessException
public ComSuccessException(int hr);
Creates a ComSuccessException object that contains the specified HRESULT.
| Parameter | Description |
| hr
| The HRESULT that a COM method returns.
|
public ComSuccessException(int hr, String message);
Creates a ComSuccessException object that contains the specified HRESULT and a detail description.
| Parameter | Description |
| hr
| The HRESULT that a COM method returns.
|
| message
| The detail description.
|
public ComSuccessException(int hr, String source, String helpFile,
int helpContext);
Creates a ComSuccessException object that contains the specified HRESULT, a detail description, a Help file, and the Help context.
| Parameter | Description |
| hr
| The HRESULT that a COM method returns.
|
| source
| The detail description.
|
| helpFile
| The Help file for the ComSuccessException object.
|
| helpContext
| The identifier that indicates the context of the exception.
|
public ComSuccessException(int hr, String description, String source,
String helpFile, int helpContext);
Creates a ComSuccessException object that contains the specified HRESULT, detail description, source, a Help file, and Help context.
| Parameter | Description |
| hr
| The HRESULT that the COM method returns.
|
| description
| The detail description.
|
| source
| The source of the ComSuccessException.
|
| helpFile
| The Help file for the ComSuccessException object.
|
| helpContext
| The identifier that indicates the context of the exception.
|
public ComSuccessException();
Creates a ComSuccessException object. The default value of the HRESULT stored in the object is S_FALSE (0x00000001L). This value indicates the successful completion of a method that returns a boolean value of false.
public ComSuccessException(String message);
Creates a ComSuccessException object that contains the specified detail description. The default value of the HRESULT stored in the object is S_FALSE (0x00000001L). This value indicates the successful completion of a method that returns a boolean value of false.
| Parameter | Description |
| message
| The detail description.
|