Class MathRuntimeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.openspaces.core.internal.commons.math.MathRuntimeException
- All Implemented Interfaces:
Serializable
Base class for commons-math unchecked exceptions.
- Since:
- 2.0
- Version:
- $Revision: 822850 $ $Date: 2009-10-07 14:56:42 -0400 (Wed, 07 Oct 2009) $
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMathRuntimeException(String pattern, Object... arguments) Constructs a newMathRuntimeExceptionwith specified formatted detail message.MathRuntimeException(Throwable rootCause) Constructs a newMathRuntimeExceptionwith specified nestedThrowableroot cause.MathRuntimeException(Throwable rootCause, String pattern, Object... arguments) Constructs a newMathRuntimeExceptionwith specified formatted detail message and nestedThrowableroot cause. -
Method Summary
Modifier and TypeMethodDescriptionstatic ArithmeticExceptioncreateArithmeticException(String pattern, Object... arguments) Constructs a newArithmeticExceptionwith specified formatted detail message.createArrayIndexOutOfBoundsException(String pattern, Object... arguments) Constructs a newArrayIndexOutOfBoundsExceptionwith specified formatted detail message.createConcurrentModificationException(String pattern, Object... arguments) Constructs a newConcurrentModificationExceptionwith specified formatted detail message.static EOFExceptioncreateEOFException(String pattern, Object... arguments) Constructs a newEOFExceptionwith specified formatted detail message.static IllegalArgumentExceptioncreateIllegalArgumentException(String pattern, Object... arguments) Constructs a newIllegalArgumentExceptionwith specified formatted detail message.static IllegalArgumentExceptioncreateIllegalArgumentException(Throwable rootCause) Constructs a newIllegalArgumentExceptionwith specified nestedThrowableroot cause.static IllegalStateExceptioncreateIllegalStateException(String pattern, Object... arguments) Constructs a newIllegalStateExceptionwith specified formatted detail message.static RuntimeExceptioncreateInternalError(Throwable cause) Create anRuntimeExceptionfor an internal error.static IOExceptioncreateIOException(Throwable rootCause) Constructs a newIOExceptionwith specified nestedThrowableroot cause.static NoSuchElementExceptioncreateNoSuchElementException(String pattern, Object... arguments) Constructs a newNoSuchElementExceptionwith specified formatted detail message.static NullPointerExceptioncreateNullPointerException(String pattern, Object... arguments) Constructs a newNullPointerExceptionwith specified formatted detail message.static ParseExceptioncreateParseException(int offset, String pattern, Object... arguments) Constructs a newParseExceptionwith specified formatted detail message.Object[]Gets the arguments used to build the message of this throwable.getMessage(Locale locale) Gets the message in a specified locale.Gets the pattern used to build the message of this throwable.voidPrints the stack trace of this exception to the standard error stream.voidPrints the stack trace of this exception to the specified stream.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MathRuntimeException
Constructs a newMathRuntimeExceptionwith specified formatted detail message. Message formatting is delegated toMessageFormat.- Parameters:
pattern- format specifierarguments- format arguments
-
MathRuntimeException
Constructs a newMathRuntimeExceptionwith specified nestedThrowableroot cause.- Parameters:
rootCause- the exception or error that caused this exception to be thrown.
-
MathRuntimeException
Constructs a newMathRuntimeExceptionwith specified formatted detail message and nestedThrowableroot cause. Message formatting is delegated toMessageFormat.- Parameters:
rootCause- the exception or error that caused this exception to be thrown.pattern- format specifierarguments- format arguments
-
-
Method Details
-
getPattern
Gets the pattern used to build the message of this throwable.- Returns:
- the pattern used to build the message of this throwable
-
getArguments
Gets the arguments used to build the message of this throwable.- Returns:
- the arguments used to build the message of this throwable
-
getMessage
Gets the message in a specified locale.- Parameters:
locale- Locale in which the message should be translated- Returns:
- localized message
-
getMessage
- Overrides:
getMessagein classThrowable
-
getLocalizedMessage
- Overrides:
getLocalizedMessagein classThrowable
-
printStackTrace
public void printStackTrace()Prints the stack trace of this exception to the standard error stream.- Overrides:
printStackTracein classThrowable
-
printStackTrace
Prints the stack trace of this exception to the specified stream.- Overrides:
printStackTracein classThrowable- Parameters:
out- thePrintStreamto use for output
-
createArithmeticException
Constructs a newArithmeticExceptionwith specified formatted detail message. Message formatting is delegated toMessageFormat.- Parameters:
pattern- format specifierarguments- format arguments- Returns:
- built exception
-
createArrayIndexOutOfBoundsException
public static ArrayIndexOutOfBoundsException createArrayIndexOutOfBoundsException(String pattern, Object... arguments) Constructs a newArrayIndexOutOfBoundsExceptionwith specified formatted detail message. Message formatting is delegated toMessageFormat.- Parameters:
pattern- format specifierarguments- format arguments- Returns:
- built exception
-
createEOFException
Constructs a newEOFExceptionwith specified formatted detail message. Message formatting is delegated toMessageFormat.- Parameters:
pattern- format specifierarguments- format arguments- Returns:
- built exception
-
createIOException
Constructs a newIOExceptionwith specified nestedThrowableroot cause.This factory method allows chaining of other exceptions within an
IOExceptioneven for Java 5. The constructor forIOExceptionwith a cause parameter was introduced only with Java 6.- Parameters:
rootCause- the exception or error that caused this exception to be thrown.- Returns:
- built exception
-
createIllegalArgumentException
public static IllegalArgumentException createIllegalArgumentException(String pattern, Object... arguments) Constructs a newIllegalArgumentExceptionwith specified formatted detail message. Message formatting is delegated toMessageFormat.- Parameters:
pattern- format specifierarguments- format arguments- Returns:
- built exception
-
createIllegalArgumentException
Constructs a newIllegalArgumentExceptionwith specified nestedThrowableroot cause.- Parameters:
rootCause- the exception or error that caused this exception to be thrown.- Returns:
- built exception
-
createIllegalStateException
public static IllegalStateException createIllegalStateException(String pattern, Object... arguments) Constructs a newIllegalStateExceptionwith specified formatted detail message. Message formatting is delegated toMessageFormat.- Parameters:
pattern- format specifierarguments- format arguments- Returns:
- built exception
-
createConcurrentModificationException
public static ConcurrentModificationException createConcurrentModificationException(String pattern, Object... arguments) Constructs a newConcurrentModificationExceptionwith specified formatted detail message. Message formatting is delegated toMessageFormat.- Parameters:
pattern- format specifierarguments- format arguments- Returns:
- built exception
-
createNoSuchElementException
public static NoSuchElementException createNoSuchElementException(String pattern, Object... arguments) Constructs a newNoSuchElementExceptionwith specified formatted detail message. Message formatting is delegated toMessageFormat.- Parameters:
pattern- format specifierarguments- format arguments- Returns:
- built exception
-
createNullPointerException
Constructs a newNullPointerExceptionwith specified formatted detail message. Message formatting is delegated toMessageFormat.- Parameters:
pattern- format specifierarguments- format arguments- Returns:
- built exception
-
createParseException
Constructs a newParseExceptionwith specified formatted detail message. Message formatting is delegated toMessageFormat.- Parameters:
offset- offset at which error occurredpattern- format specifierarguments- format arguments- Returns:
- built exception
-
createInternalError
Create anRuntimeExceptionfor an internal error.- Parameters:
cause- underlying cause- Returns:
- an
RuntimeExceptionfor an internal error
-