Package de.latlon.ets.core.error
Class ErrorMessage
java.lang.Object
de.latlon.ets.core.error.ErrorMessage
Utility class for retrieving and formatting localized error messages that describe
failed assertions.
- Author:
- Lyn Goltz
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringformat(ErrorMessageKey msgKey, Object... args) Produces a formatted error message using the supplied substitution arguments and the current locale.static Stringget(ErrorMessageKey msgKey) Retrieves a simple message according to the current locale.
-
Method Details
-
format
Produces a formatted error message using the supplied substitution arguments and the current locale. The arguments should reflect the order of the placeholders in the message template.- Parameters:
msgKey- TheErrorMessageKeyidentifying the message template.args- An array of arguments to be formatted and substituted in the content of the message.- Returns:
- A String containing the message content. If no message is found for the
given key, a
MissingResourceExceptionis thrown.
-
get
Retrieves a simple message according to the current locale.- Parameters:
msgKey- TheErrorMessageKeyidentifying the message.- Returns:
- A String containing the message content. If no message is found for the
given key, a
MissingResourceExceptionis thrown.
-