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 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.
|
||||
|
||||
Reference in New Issue
Block a user