Module java.money
Package javax.money

Class UnknownCurrencyException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
javax.money.MonetaryException
javax.money.UnknownCurrencyException
All Implemented Interfaces:
java.io.Serializable

public class UnknownCurrencyException
extends MonetaryException
Exception thrown when a currency code cannot be resolved into a CurrencyUnit.
Version:
0.8
Author:
Werner Keil, Anatole Tresch
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    UnknownCurrencyException​(java.lang.String code)
    Creates a new exception instance when a CurrencyUnit could not be evaluated given a currency code.
    UnknownCurrencyException​(java.util.Locale locale)
    Creates a new exception instance when a CurrencyUnit 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 Details

  • Method Details

    • 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