Class ProwideException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ProwideException
    extends java.lang.RuntimeException
    Base class for Prowide exceptions hierarchy.
    Since:
    7.7
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addVariable​(java.lang.String key, java.lang.String value)
      Initializes the variables Map if necessary and puts the parameter tuple.
      static java.util.ResourceBundle getBundle()  
      static java.util.ResourceBundle getBundle​(java.util.Locale locale)  
      java.lang.String getMessage()
      Gets a descriptive message suitable for presenting to the final user, using the default locale.
      java.lang.String getMessage​(java.util.Locale locale)
      Gets a descriptive, localized error message suitable for presenting to the final user.
      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.
      protected java.lang.String getVariable​(java.lang.String key)
      Returns a variable value, if set, given its key
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ProwideException

        public ProwideException()
      • ProwideException

        public ProwideException​(java.lang.String message,
                                java.lang.Throwable cause)
      • ProwideException

        public ProwideException​(java.lang.String message)
      • ProwideException

        public ProwideException​(java.lang.Throwable cause)
    • 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:
        getMessage in class java.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 locale
        variables - 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 key
        value - 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