Module life.expert

Class UnknownUnitException

  • All Implemented Interfaces:
    java.io.Serializable

    public class UnknownUnitException
    extends ValueException
    Exception thrown when a unit code cannot be resolved into a Unit.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      UnknownUnitException​(java.lang.String code)
      Creates a new exception instance when a Unit could not be evaluated given a unit code.
      UnknownUnitException​(java.util.Locale locale)
      Creates a new exception instance when a Unit could not be evaluated given a (country) Locale.
    • Method Summary

      Modifier and Type Method Description
      java.lang.String getCurrencyCode()
      Access the invalid currency code.
      java.util.Locale getLocale()
      Access the invalid Locale.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Throwable

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

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

      • UnknownUnitException

        public UnknownUnitException​(java.lang.String code)
        Creates a new exception instance when a Unit could not be evaluated given a unit code.
        Parameters:
        code - The unknown currency code (the message is constructed automatically), not null.
        See Also:
        Piece#getCode()
      • UnknownUnitException

        public UnknownUnitException​(java.util.Locale locale)
        Creates a new exception instance when a Unit could not be evaluated given a (country) Locale.
        Parameters:
        locale - The unknown Locale, for which a Unit was queried (the message is constructed automatically), not null.
        See Also:
        Piece#getCode()
    • Method Detail

      • getCurrencyCode

        public java.lang.String getCurrencyCode()
        Access the invalid currency code.
        Returns:
        the invalid currency code, or null.
      • getLocale

        public java.util.Locale getLocale()
        Access the invalid Locale.
        Returns:
        the invalid Locale, or null.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Throwable