Package com.iizix

Class LanguageException

  • All Implemented Interfaces:
    java.io.Serializable

    public class LanguageException
    extends java.lang.Exception
    A language exception is thrown when a request is made to retrieve some data for a particular language code that is not available in the current app configuration for languages and text tables.
    Author:
    Christopher Mindus
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      ConstructorDescription
      LanguageException​(java.lang.String detail)
      Constructs a language exception with default language code and without causing exception.
      LanguageException​(java.lang.String detail, java.lang.String languageCode)
      Constructs a language exception.
      LanguageException​(java.lang.String detail, java.lang.String languageCode, java.lang.Throwable cause)
      Constructs a language exception.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringgetLanguageCode()
      Gets the language code for the exception.
      java.lang.StringgetLanguageDescription()
      Gets the language descriptive name for the exception.
      java.lang.StringgetMessage()
      Returns the detail message string of this language exception.
      • 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

      • LanguageException

        public LanguageException​(java.lang.String detail)
        Constructs a language exception with default language code and without causing exception.
        Parameters:
        detail - The message detail.
      • LanguageException

        public LanguageException​(java.lang.String detail,
                                 java.lang.String languageCode)
        Constructs a language exception.
        Parameters:
        detail - The message detail.
        languageCode - The language code used, or null for default language code.
      • LanguageException

        public LanguageException​(java.lang.String detail,
                                 java.lang.String languageCode,
                                 java.lang.Throwable cause)
        Constructs a language exception.
        Parameters:
        detail - The message detail.
        languageCode - The language code used, or null for default language code.
        cause - The exception causing this language exception, or null for no such cause. Use {@link #getCause()} to find the causing exception.
    • Method Detail

      • getLanguageCode

        public java.lang.String getLanguageCode()
        Gets the language code for the exception.
        Returns:
        The language code, or null for default language.
      • getLanguageDescription

        public java.lang.String getLanguageDescription()
        Gets the language descriptive name for the exception.
        Returns:
        The language code description, "UNKNOWN" for unknown language code, or null for the default language.
      • getMessage

        public java.lang.String getMessage()
        Returns the detail message string of this language exception.
        Overrides:
        getMessage in class java.lang.Throwable
        Returns:
        The detail message string of this LanguageException instance (which may be null).