mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Convert throws and catch alls (RIPD-1046)
This commit is contained in:
committed by
Nik Bougalis
parent
0633ef1ba1
commit
880f354b90
@@ -18,6 +18,7 @@
|
||||
//==============================================================================
|
||||
|
||||
#include <BeastConfig.h>
|
||||
#include <ripple/basics/contract.h>
|
||||
#include <ripple/protocol/IOUAmount.h>
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
@@ -56,7 +57,7 @@ IOUAmount::normalize ()
|
||||
while (mantissa_ > maxMantissa)
|
||||
{
|
||||
if (exponent_ >= maxExponent)
|
||||
throw std::overflow_error ("IOUAmount::normalize");
|
||||
Throw<std::overflow_error> ("IOUAmount::normalize");
|
||||
|
||||
mantissa_ /= 10;
|
||||
++exponent_;
|
||||
@@ -69,7 +70,7 @@ IOUAmount::normalize ()
|
||||
}
|
||||
|
||||
if (exponent_ > maxExponent)
|
||||
throw std::overflow_error ("value overflow");
|
||||
Throw<std::overflow_error> ("value overflow");
|
||||
|
||||
if (negative)
|
||||
mantissa_ = -mantissa_;
|
||||
|
||||
Reference in New Issue
Block a user