Package org.orekit.rugged.errors
Class RuggedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.orekit.rugged.errors.RuggedException
-
- All Implemented Interfaces:
Serializable
,LocalizedException
public class RuggedException extends RuntimeException implements LocalizedException
This class is the base class for all specific exceptions thrown by the rugged library classes.This class is heavily based on
OrekitException
, which is distributed under the terms of the Apache License V2.- Author:
- Luc Maisonobe, Guylaine Prat
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RuggedException(Throwable cause, Localizable specifier, Object... parts)
Simple constructor.RuggedException(Localizable specifier, Object... parts)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLocalizedMessage()
String
getMessage()
String
getMessage(Locale locale)
Object[]
getParts()
Get the variable parts of the error message.Localizable
getSpecifier()
Get the localizable specifier of the error message.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
RuggedException
public RuggedException(Localizable specifier, Object... parts)
Simple constructor. Build an exception with a translated and formatted message- Parameters:
specifier
- format specifier (to be translated)parts
- parts to insert in the format (no translation)
-
RuggedException
public RuggedException(Throwable cause, Localizable specifier, Object... parts)
Simple constructor. Build an exception from a cause and with a translated and formatted message- Parameters:
cause
- underlying causespecifier
- format specifier (to be translated)parts
- parts to insert in the format (no translation)
-
-
Method Detail
-
getMessage
public String getMessage(Locale locale)
- Specified by:
getMessage
in interfaceLocalizedException
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
getLocalizedMessage
public String getLocalizedMessage()
- Overrides:
getLocalizedMessage
in classThrowable
-
getSpecifier
public Localizable getSpecifier()
Get the localizable specifier of the error message.- Specified by:
getSpecifier
in interfaceLocalizedException
- Returns:
- localizable specifier of the error message
-
getParts
public Object[] getParts()
Get the variable parts of the error message.- Specified by:
getParts
in interfaceLocalizedException
- Returns:
- a copy of the variable parts of the error message
-
-