Package com.prowidesoftware
Class ProwideException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.prowidesoftware.ProwideException
-
- All Implemented Interfaces:
java.io.Serializable
public class ProwideException extends java.lang.RuntimeExceptionBase class for Prowide exceptions hierarchy.- Since:
- 7.7
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProwideException()ProwideException(java.lang.String message)ProwideException(java.lang.String message, java.lang.Throwable cause)ProwideException(java.lang.Throwable cause)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddVariable(java.lang.String key, java.lang.String value)Initializes the variables Map if necessary and puts the parameter tuple.static java.util.ResourceBundlegetBundle()static java.util.ResourceBundlegetBundle(java.util.Locale locale)java.lang.StringgetMessage()Gets a descriptive message suitable for presenting to the final user, using the default locale.java.lang.StringgetMessage(java.util.Locale locale)Gets a descriptive, localized error message suitable for presenting to the final user.protected java.lang.StringgetMessage(java.util.Locale locale, java.util.Map<java.lang.String,java.lang.String> variables)Gets a descriptive, localized error message suitable for presenting to the final user.protected java.lang.StringgetVariable(java.lang.String key)Returns a variable value, if set, given its key
-
-
-
Method Detail
-
getBundle
public static java.util.ResourceBundle getBundle()
-
getBundle
public static java.util.ResourceBundle getBundle(java.util.Locale locale)
-
getMessage
public java.lang.String getMessage(java.util.Locale locale)
Gets a descriptive, localized error message suitable for presenting to the final user.- Parameters:
locale- optional locale- Returns:
- exception description
-
getMessage
public java.lang.String getMessage()
Gets a descriptive message suitable for presenting to the final user, using the default locale.- Overrides:
getMessagein classjava.lang.Throwable- Returns:
- the formated text message
-
getMessage
protected java.lang.String getMessage(java.util.Locale locale, java.util.Map<java.lang.String,java.lang.String> variables)Gets a descriptive, localized error message suitable for presenting to the final user.- Parameters:
locale- optional localevariables- optional map of variables to replace in the message read from resource bundle- Returns:
- exception description
-
addVariable
protected void addVariable(java.lang.String key, java.lang.String value)Initializes the variables Map if necessary and puts the parameter tuple.- Parameters:
key- variable keyvalue- variable value
-
getVariable
protected java.lang.String getVariable(java.lang.String key)
Returns a variable value, if set, given its key- Parameters:
key- variable key name- Returns:
- found variable value or null if not found
-
-