public class OrekitException extends Exception implements LocalizedException
When the orekit classes throw exceptions that are specific to the package, these exceptions are always subclasses of OrekitException. When exceptions that are already covered by the standard java API should be thrown, like ArrayIndexOutOfBoundsException or InvalidParameterException, these standard exceptions are thrown rather than the commons-math specific ones.
This class also provides utility methods to throw some standard java exceptions with localized messages.
Constructor and Description |
---|
OrekitException(ExceptionContextProvider provider)
Simple constructor.
|
OrekitException(Localizable specifier,
Object... parts)
Simple constructor.
|
OrekitException(Localizable message,
Throwable cause)
Simple constructor.
|
OrekitException(OrekitException exception)
Copy constructor.
|
OrekitException(Throwable cause,
Localizable specifier,
Object... parts)
Simple constructor.
|
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public OrekitException(Localizable specifier, Object... parts)
specifier
- format specifier (to be translated)parts
- parts to insert in the format (no translation)public OrekitException(OrekitException exception)
exception
- exception to copy frompublic OrekitException(Localizable message, Throwable cause)
message
- descriptive messagecause
- underlying causepublic OrekitException(Throwable cause, Localizable specifier, Object... parts)
cause
- underlying causespecifier
- format specifier (to be translated)parts
- parts to insert in the format (no translation)public OrekitException(ExceptionContextProvider provider)
provider
- underlying exception context providerpublic String getMessage(Locale locale)
getMessage
in interface LocalizedException
locale
- Locale in which the message should be translatedpublic String getMessage()
getMessage
in class Throwable
public String getLocalizedMessage()
getLocalizedMessage
in class Throwable
public Localizable getSpecifier()
getSpecifier
in interface LocalizedException
public Object[] getParts()
getParts
in interface LocalizedException
@Deprecated public static OrekitIllegalArgumentException createIllegalArgumentException(Localizable specifier, Object... parts)
OrekitIllegalArgumentException.OrekitIllegalArgumentException(Localizable, Object...)
IllegalArgumentException
with localized message.specifier
- format specifier (to be translated)parts
- parts to insert in the format (no translation)IllegalArgumentException
that also implements@Deprecated public static OrekitIllegalStateException createIllegalStateException(Localizable specifier, Object... parts)
OrekitIllegalStateException.OrekitIllegalStateException(Localizable, Object...)
IllegalStateException
with localized message.specifier
- format specifier (to be translated)parts
- parts to insert in the format (no translation)IllegalStateException
with localized message@Deprecated public static OrekitParseException createParseException(Localizable specifier, Object... parts)
OrekitParseException.OrekitParseException(Localizable, Object...)
ParseException
with localized message.specifier
- format specifier (to be translated)parts
- parts to insert in the format (no translation)ParseException
with localized message@Deprecated public static RuntimeException createInternalError(Throwable cause)
OrekitInternalError.OrekitInternalError(Throwable)
RuntimeException
for an internal error.cause
- underlying causeRuntimeException
for an internal errorCopyright © 2002-2016 CS Systèmes d'information. All rights reserved.