mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Catch throws in PaymentTransactor.
This commit is contained in:
@@ -160,6 +160,8 @@ TER PaymentTransactor::doApply()
|
|||||||
STAmount saMaxAmountAct;
|
STAmount saMaxAmountAct;
|
||||||
STAmount saDstAmountAct;
|
STAmount saDstAmountAct;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
terResult = isSetBit(mParams, tapOPEN_LEDGER) && spsPaths.size() > RIPPLE_PATHS_MAX
|
terResult = isSetBit(mParams, tapOPEN_LEDGER) && spsPaths.size() > RIPPLE_PATHS_MAX
|
||||||
? telBAD_PATH_COUNT // Too many paths for proposed ledger.
|
? telBAD_PATH_COUNT // Too many paths for proposed ledger.
|
||||||
: RippleCalc::rippleCalc(
|
: RippleCalc::rippleCalc(
|
||||||
@@ -177,6 +179,13 @@ TER PaymentTransactor::doApply()
|
|||||||
bNoRippleDirect, // Always compute for finalizing ledger.
|
bNoRippleDirect, // Always compute for finalizing ledger.
|
||||||
false); // Not standalone, delete unfundeds.
|
false); // Not standalone, delete unfundeds.
|
||||||
}
|
}
|
||||||
|
catch (const std::exception& e)
|
||||||
|
{
|
||||||
|
cLog(lsINFO) << "Payment: Caught throw: " << e.what();
|
||||||
|
|
||||||
|
terResult = tefEXCEPTION;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Direct XRP payment.
|
// Direct XRP payment.
|
||||||
|
|||||||
Reference in New Issue
Block a user