public abstract class ODataLibraryException extends ODataException
Modifier and Type | Class and Description |
---|---|
static interface |
ODataLibraryException.MessageKey
Key for the exception text in the resource bundle.
|
static class |
ODataLibraryException.ODataErrorMessage
Error message text and
Locale used for it. |
Modifier and Type | Field and Description |
---|---|
protected static String |
DEFAULT_SERVER_BUNDLE_NAME |
Modifier | Constructor and Description |
---|---|
protected |
ODataLibraryException(String developmentMessage,
ODataLibraryException.MessageKey messageKey,
String... parameters) |
protected |
ODataLibraryException(String developmentMessage,
Throwable cause,
ODataLibraryException.MessageKey messageKey,
String... parameters) |
Modifier and Type | Method and Description |
---|---|
protected abstract String |
getBundleName()
Gets the name of the
ResourceBundle containing the exception texts. |
String |
getLocalizedMessage() |
ODataLibraryException.MessageKey |
getMessageKey()
Gets the message key.
|
ODataLibraryException.ODataErrorMessage |
getTranslatedMessage(Locale locale)
Gets the translated message text for a given locale (or the default locale if not available),
returning the developer message text if none is found.
|
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
protected static final String DEFAULT_SERVER_BUNDLE_NAME
protected ODataLibraryException(String developmentMessage, ODataLibraryException.MessageKey messageKey, String... parameters)
protected ODataLibraryException(String developmentMessage, Throwable cause, ODataLibraryException.MessageKey messageKey, String... parameters)
public String getLocalizedMessage()
getLocalizedMessage
in class Throwable
public ODataLibraryException.MessageKey getMessageKey()
public ODataLibraryException.ODataErrorMessage getTranslatedMessage(Locale locale)
locale
- the preferred Locale
protected abstract String getBundleName()
Gets the name of the ResourceBundle
containing the exception texts.
The key for an exception text is the concatenation of the exception-class name and
the ODataLibraryException.MessageKey
, separated by a dot.
Copyright © 2013–2018 The Apache Software Foundation. All rights reserved.