Change an exception test to a plain if

This commit is contained in:
John Wiegley 2010-03-05 22:09:02 -05:00
parent 5850d041b6
commit fd4fa8a114

View file

@ -857,12 +857,10 @@ bool value_t::is_less_than(const value_t& val) const
case INTEGER:
return as_amount() < val.as_long();
case AMOUNT:
try {
if (as_amount().commodity() == val.as_amount().commodity())
return as_amount() < val.as_amount();
}
catch (const amount_error&) {
else
return commodity_t::compare_by_commodity()(&as_amount(), &val.as_amount());
}
default:
break;
}