com.ls.util
Interface IErrorHandler
- All Known Implementing Classes:
- ResourceBasedErrorHandler
- public interface IErrorHandler
Interface that defines methods for error handling
- Version:
- $Revision: 1.3 $
- Author:
- Last modified by $Author: TBerk $
DEFAULT_ERROR_MESSAGE
public static final String DEFAULT_ERROR_MESSAGE
- Default error message if it could not be retrieved from the database and the resource bundle.
The dafult value is defined as "A general error occurred!".
DEFAULT_LOCALE
public static final String DEFAULT_LOCALE
- The default local string value for the system.
The dafult value is defined as "de".
getErrorMessage
public String getErrorMessage(String key)
throws ResourceBundleException
- Returns a error message from the resourceBundle specified by the key
- Parameters:
key
- The key of the error message- Returns:
- The value (error message itself) which belongs to the given key.
- Throws:
ResourceBundleException
- If there is an error while retrieving this message from resource bundle
getErrorMessage
public String getErrorMessage(String key,
String languageCode)
throws ResourceBundleException
- Returns a error message from the resourceBundle specified by the key
- Parameters:
key
- The key of the error messagelanguageCode
- The language code- Returns:
- The value (error message itself) which belongs to the given key.
- Throws:
ResourceBundleException
- If there is an error while retrieving this message from resource bundle