task2/solution10/src/org/apidesign/apifest08/currency/CurrencyNotAvailableException.java
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/task2/solution10/src/org/apidesign/apifest08/currency/CurrencyNotAvailableException.java Wed Oct 01 10:43:05 2008 +0200
1.3 @@ -0,0 +1,21 @@
1.4 +package org.apidesign.apifest08.currency;
1.5 +
1.6 +import java.util.*;
1.7 +
1.8 +public final class CurrencyNotAvailableException extends RuntimeException {
1.9 +
1.10 + private final Currency currency;
1.11 +
1.12 + CurrencyNotAvailableException(Currency currency) {
1.13 + this(currency, String.format("Currency %1$s not available", currency));
1.14 + }
1.15 +
1.16 + CurrencyNotAvailableException(Currency currency, String message) {
1.17 + super(message);
1.18 + this.currency = currency;
1.19 + }
1.20 +
1.21 + public Currency getCurrency() {
1.22 + return currency;
1.23 + }
1.24 +}