Skip to content

Commit 0894282

Browse files
committed
Merge pull request #2 from stokito/CurrencyConversionException
Fixes to Javadoc of CurrencyConversionException.
2 parents 056ad19 + d7cd229 commit 0894282

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

conversion/src/main/java/org/javamoney/convert/CurrencyConversionException.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ public class CurrencyConversionException extends MonetaryException {
4141
* Constructs an <code>CurrencyConversionException</code> with the specified
4242
* detail message, timestamp, source and target currency.
4343
*
44-
* @param source
44+
* @param base
4545
* the source currency, may be null.
4646
*
47-
* @param target
47+
* @param term
4848
* the target currency, may be null.
4949
*
5050
* @param message
@@ -63,10 +63,10 @@ public CurrencyConversionException(CurrencyUnit base,
6363
* Constructs an <code>CurrencyConversionException</code> with the specified
6464
* source and target currency.
6565
*
66-
* @param source
66+
* @param base
6767
* the source currency, may be null.
6868
*
69-
* @param target
69+
* @param term
7070
* the target currency, may be null.
7171
*/
7272
public CurrencyConversionException(CurrencyUnit base,
@@ -86,9 +86,9 @@ public CurrencyConversionException(CurrencyUnit base,
8686
* Note that the detail message associated with <code>cause</code> is
8787
* <i>not</i> automatically incorporated in this exception's detail message.
8888
*
89-
* @param source
89+
* @param base
9090
* the source currency, may be null.
91-
* @param target
91+
* @param term
9292
* the target currency, may be null.
9393
* @param message
9494
* the detail message (which is saved for later retrieval by the
@@ -101,7 +101,9 @@ public CurrencyConversionException(CurrencyUnit base,
101101
*/
102102
public CurrencyConversionException(CurrencyUnit base,
103103
CurrencyUnit term, Long timestamp, String message, Throwable cause) {
104-
super(message, cause);
104+
super("Cannot convert " + String.valueOf(base) + " into "
105+
+ String.valueOf(term) + (message != null ? ": " + message : ""),
106+
cause);
105107
this.base = base;
106108
this.term = term;
107109
this.timestamp = timestamp;

0 commit comments

Comments
 (0)