task1/solution10/src/org/apidesign/apifest08/currency/CurrencyNotAvailableException.java
author japod@localhost
Tue, 30 Sep 2008 16:11:32 +0200
changeset 28 36331f7244bd
permissions -rw-r--r--
finishing update of solution 04 to 1.5
     1 package org.apidesign.apifest08.currency;
     2 
     3 import java.util.*;
     4 
     5 public final class CurrencyNotAvailableException extends RuntimeException {
     6 
     7 	private final Currency currency;
     8 
     9 	CurrencyNotAvailableException(Currency currency) {
    10 		this(currency, String.format("Currency %1$s not available", currency));	
    11 	}
    12 
    13 	CurrencyNotAvailableException(Currency currency, String message) {
    14 		super(message);
    15 		this.currency = currency;
    16 	}
    17 
    18 	public Currency getCurrency() {
    19 		return currency;
    20 	}
    21 }