Skip to content

Commit df5dc1c

Browse files
committed
:i
1 parent 453aad9 commit df5dc1c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/org/javamoney/moneta/spi/AbstractAmountBuilder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ public abstract class AbstractAmountBuilder<T extends MonetaryAmount> implements
5050
@Override
5151
public T create() {
5252
if (currency == null) {
53-
throw new MonetaryException("Cannot of FastMoney instance: missing currency.");
53+
throw new MonetaryException("Cannot create an instance of '"+this.getAmountType().getName()+"': missing currency.");
5454
}
5555
if (number == null) {
56-
throw new MonetaryException("Cannot of FastMoney instance: missing number.");
56+
throw new MonetaryException("Cannot create an instance of '"+this.getAmountType().getName()+"': missing number.");
5757
}
5858
if (monetaryContext == null) {
59-
throw new MonetaryException("Cannot of FastMoney instance: missing context.");
59+
throw new MonetaryException("Cannot create an instance of '"+this.getAmountType().getName()+"': missing context.");
6060
}
6161
return create(number, currency, monetaryContext);
6262
}
@@ -100,7 +100,7 @@ public MonetaryAmountFactory<T> setCurrency(String currencyCode) {
100100
}
101101

102102
/**
103-
* Creates a new instance of {@link MonetaryAmounts}, using the default {@link MonetaryContext}.
103+
* Creates a new instance of {@link Monetary}, using the default {@link MonetaryContext}.
104104
*
105105
* @param number numeric value.
106106
* @return a {@code Money} combining the numeric value and currency unit.

0 commit comments

Comments
 (0)