com.ibm.optim.oaas.client.OaasException.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api_java_client Show documentation
Show all versions of api_java_client Show documentation
Java client API for DOCplexCloud, version 1.0-STABLE-b832
The newest version!
OaasException (Java Client for DOcplexcloud 1.0 API)
com.ibm.optim.oaas.client
Class OaasException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.ibm.optim.oaas.client.OaasException
-
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- JobException, OperationException
public class OaasException
extends Exception
Base class for OaaS exceptions.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors
Constructor and Description
OaasException(String message,
Object... parameters)
Create an exception.
OaasException(String message,
Throwable cause,
Object... parameters)
Create an exception.
OaasException(Throwable cause)
Create an exception.
-
Method Summary
Methods
Modifier and Type
Method and Description
String
getLocalizedMessage()
Gets the localized message.
String
getLocalizedMessage(String localeName)
Gets the localized message using a given locale.
String
getMessage()
Use localized messages if you have them.
String
getMessageCode()
Returns the message code.
Object[]
getParameters()
Gets the parameters, if any, that were set in the constructor.
int
getRestStatusCode()
Gets the REST status code.
static Throwable
getRootCause(Throwable throwable)
Gets the real (deepest) root cause of an exception.
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
Constructor Detail
-
OaasException
public OaasException(String message,
Throwable cause,
Object... parameters)
Create an exception.
- Parameters:
message
- The exception message.cause
- The cause of the exception.parameters
- The optional parameters for the message.
-
OaasException
public OaasException(String message,
Object... parameters)
Create an exception.
- Parameters:
message
- The exception message.parameters
- The optional parameters for the message.
-
OaasException
public OaasException(Throwable cause)
Create an exception.
- Parameters:
cause
- The cause of the exception.
-
Method Detail
-
getParameters
public Object[] getParameters()
Gets the parameters, if any, that were set in the constructor.
- Returns:
- The parameters.
-
getLocalizedMessage
public String getLocalizedMessage(String localeName)
Gets the localized message using a given locale.
- Parameters:
localeName
- The name of the locale for the message.
- Returns:
- The localized message.
-
getLocalizedMessage
public String getLocalizedMessage()
Gets the localized message.
- Overrides:
getLocalizedMessage
in class Throwable
- Returns:
- The localized message using the default locale.
-
getMessage
public String getMessage()
Use localized messages if you have them.
- Overrides:
getMessage
in class Throwable
-
getRootCause
public static Throwable getRootCause(Throwable throwable)
Gets the real (deepest) root cause of an exception.
- Parameters:
throwable
- the exception.
- Returns:
- The deepest non-null exception (cause).
-
getRestStatusCode
public int getRestStatusCode()
Gets the REST status code. This method must be overridden to provide the
appropriate value.
- Returns:
- The status code.
-
getMessageCode
public String getMessageCode()
Returns the message code.
- Returns:
- The message code.
Copyright © 2015–2017 IBM Corporation. Licensed under the Apache License, Version 2.0.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy