![JAR search and dependency download from the Maven repository](/logo.png)
com.ibm.optim.oaas.client.OaasRuntimeException.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.257
The newest version!
OaasRuntimeException (Java Client for DOcplexcloud 1.0 API)
com.ibm.optim.oaas.client
Class OaasRuntimeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.ibm.optim.oaas.client.OaasRuntimeException
-
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- InternalException, InvalidParameterException, ParsingException, SecurityException
public class OaasRuntimeException
extends RuntimeException
Base class for OaaS runtime exceptions.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors
Constructor and Description
OaasRuntimeException(String message,
Object... parameters)
Creates an exception.
OaasRuntimeException(String message,
Throwable cause,
Object... parameters)
Creates an exception.
OaasRuntimeException(Throwable cause)
Creates 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()
Uses 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
-
OaasRuntimeException
public OaasRuntimeException(String message,
Throwable cause,
Object... parameters)
Creates an exception.
- Parameters:
message
- The exception message.cause
- The cause of the exception.parameters
- The optional parameters for the message.
-
OaasRuntimeException
public OaasRuntimeException(String message,
Object... parameters)
Creates an exception.
- Parameters:
message
- The exception message.parameters
- The optional parameters for the message.
-
OaasRuntimeException
public OaasRuntimeException(Throwable cause)
Creates 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()
Uses 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