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

public class MathRuntimeException extends RuntimeException
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 Details

    • MathRuntimeException

      public MathRuntimeException(String pattern, Object... arguments)
      Constructs a new MathRuntimeException with specified formatted detail message. Message formatting is delegated to MessageFormat.
      Parameters:
      pattern - format specifier
      arguments - format arguments
    • MathRuntimeException

      public MathRuntimeException(Throwable rootCause)
      Constructs a new MathRuntimeException with specified nested Throwable root cause.
      Parameters:
      rootCause - the exception or error that caused this exception to be thrown.
    • MathRuntimeException

      public MathRuntimeException(Throwable rootCause, String pattern, Object... arguments)
      Constructs a new MathRuntimeException with specified formatted detail message and nested Throwable root cause. Message formatting is delegated to MessageFormat.
      Parameters:
      rootCause - the exception or error that caused this exception to be thrown.
      pattern - format specifier
      arguments - format arguments
  • Method Details

    • getPattern

      public String getPattern()
      Gets the pattern used to build the message of this throwable.
      Returns:
      the pattern used to build the message of this throwable
    • getArguments

      public Object[] getArguments()
      Gets the arguments used to build the message of this throwable.
      Returns:
      the arguments used to build the message of this throwable
    • getMessage

      public String getMessage(Locale locale)
      Gets the message in a specified locale.
      Parameters:
      locale - Locale in which the message should be translated
      Returns:
      localized message
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • getLocalizedMessage

      public String getLocalizedMessage()
      Overrides:
      getLocalizedMessage in class Throwable
    • printStackTrace

      public void printStackTrace()
      Prints the stack trace of this exception to the standard error stream.
      Overrides:
      printStackTrace in class Throwable
    • printStackTrace

      public void printStackTrace(PrintStream out)
      Prints the stack trace of this exception to the specified stream.
      Overrides:
      printStackTrace in class Throwable
      Parameters:
      out - the PrintStream to use for output
    • createArithmeticException

      public static ArithmeticException createArithmeticException(String pattern, Object... arguments)
      Constructs a new ArithmeticException with specified formatted detail message. Message formatting is delegated to MessageFormat.
      Parameters:
      pattern - format specifier
      arguments - format arguments
      Returns:
      built exception
    • createArrayIndexOutOfBoundsException

      public static ArrayIndexOutOfBoundsException createArrayIndexOutOfBoundsException(String pattern, Object... arguments)
      Constructs a new ArrayIndexOutOfBoundsException with specified formatted detail message. Message formatting is delegated to MessageFormat.
      Parameters:
      pattern - format specifier
      arguments - format arguments
      Returns:
      built exception
    • createEOFException

      public static EOFException createEOFException(String pattern, Object... arguments)
      Constructs a new EOFException with specified formatted detail message. Message formatting is delegated to MessageFormat.
      Parameters:
      pattern - format specifier
      arguments - format arguments
      Returns:
      built exception
    • createIOException

      public static IOException createIOException(Throwable rootCause)
      Constructs a new IOException with specified nested Throwable root cause.

      This factory method allows chaining of other exceptions within an IOException even for Java 5. The constructor for IOException with 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 new IllegalArgumentException with specified formatted detail message. Message formatting is delegated to MessageFormat.
      Parameters:
      pattern - format specifier
      arguments - format arguments
      Returns:
      built exception
    • createIllegalArgumentException

      public static IllegalArgumentException createIllegalArgumentException(Throwable rootCause)
      Constructs a new IllegalArgumentException with specified nested Throwable root 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 new IllegalStateException with specified formatted detail message. Message formatting is delegated to MessageFormat.
      Parameters:
      pattern - format specifier
      arguments - format arguments
      Returns:
      built exception
    • createConcurrentModificationException

      public static ConcurrentModificationException createConcurrentModificationException(String pattern, Object... arguments)
      Constructs a new ConcurrentModificationException with specified formatted detail message. Message formatting is delegated to MessageFormat.
      Parameters:
      pattern - format specifier
      arguments - format arguments
      Returns:
      built exception
    • createNoSuchElementException

      public static NoSuchElementException createNoSuchElementException(String pattern, Object... arguments)
      Constructs a new NoSuchElementException with specified formatted detail message. Message formatting is delegated to MessageFormat.
      Parameters:
      pattern - format specifier
      arguments - format arguments
      Returns:
      built exception
    • createNullPointerException

      public static NullPointerException createNullPointerException(String pattern, Object... arguments)
      Constructs a new NullPointerException with specified formatted detail message. Message formatting is delegated to MessageFormat.
      Parameters:
      pattern - format specifier
      arguments - format arguments
      Returns:
      built exception
    • createParseException

      public static ParseException createParseException(int offset, String pattern, Object... arguments)
      Constructs a new ParseException with specified formatted detail message. Message formatting is delegated to MessageFormat.
      Parameters:
      offset - offset at which error occurred
      pattern - format specifier
      arguments - format arguments
      Returns:
      built exception
    • createInternalError

      public static RuntimeException createInternalError(Throwable cause)
      Create an RuntimeException for an internal error.
      Parameters:
      cause - underlying cause
      Returns:
      an RuntimeException for an internal error