Catch throws in PaymentTransactor.

This commit is contained in:
Arthur Britto
2013-02-02 19:10:36 -08:00
parent 1b27d2bc10
commit 2c957df3cc

View File

@@ -160,6 +160,8 @@ TER PaymentTransactor::doApply()
STAmount saMaxAmountAct;
STAmount saDstAmountAct;
try
{
terResult = isSetBit(mParams, tapOPEN_LEDGER) && spsPaths.size() > RIPPLE_PATHS_MAX
? telBAD_PATH_COUNT // Too many paths for proposed ledger.
: RippleCalc::rippleCalc(
@@ -177,6 +179,13 @@ TER PaymentTransactor::doApply()
bNoRippleDirect, // Always compute for finalizing ledger.
false); // Not standalone, delete unfundeds.
}
catch (const std::exception& e)
{
cLog(lsINFO) << "Payment: Caught throw: " << e.what();
terResult = tefEXCEPTION;
}
}
else
{
// Direct XRP payment.