mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replace uses of BOOST_THROW_EXCEPTION with assertThrow
Where appropriate.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <libdevcore/IpfsHash.h>
|
||||
|
||||
#include <libdevcore/Assertions.h>
|
||||
#include <libdevcore/Exceptions.h>
|
||||
#include <libdevcore/picosha2.h>
|
||||
#include <libdevcore/CommonData.h>
|
||||
@@ -55,11 +56,7 @@ string base58Encode(bytes const& _data)
|
||||
|
||||
bytes dev::ipfsHash(string _data)
|
||||
{
|
||||
if (_data.length() >= 1024 * 256)
|
||||
BOOST_THROW_EXCEPTION(
|
||||
DataTooLong() <<
|
||||
errinfo_comment("Ipfs hash for large (chunked) files not yet implemented.")
|
||||
);
|
||||
assertThrow(_data.length() < 1024 * 256, DataTooLong, "IPFS hash for large (chunked) files not yet implemented.");
|
||||
|
||||
bytes lengthAsVarint = varintEncoding(_data.size());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user