diff options
author | LianaHus <liana@ethdev.com> | 2015-10-02 20:41:40 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-10-15 02:27:41 +0800 |
commit | 742e5b259a8c88e69f09ede7312673157cd77a1f (patch) | |
tree | 7d1d44995676d828e216078be7803e80cfaf7d0d /libsolidity/Types.cpp | |
parent | 95ad87267878a168dba98d5eb16e27dc9632465d (diff) | |
download | dexon-solidity-742e5b259a8c88e69f09ede7312673157cd77a1f.tar.gz dexon-solidity-742e5b259a8c88e69f09ede7312673157cd77a1f.tar.zst dexon-solidity-742e5b259a8c88e69f09ede7312673157cd77a1f.zip |
added Error class for all kind of errors
Conflicts:
libsolidity/Exceptions.h
Diffstat (limited to 'libsolidity/Types.cpp')
-rw-r--r-- | libsolidity/Types.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libsolidity/Types.cpp b/libsolidity/Types.cpp index c800e288..3ccaaf5d 100644 --- a/libsolidity/Types.cpp +++ b/libsolidity/Types.cpp @@ -50,7 +50,7 @@ void StorageOffsets::computeOffsets(TypePointers const& _types) byteOffset = 0; } if (slotOffset >= bigint(1) << 256) - BOOST_THROW_EXCEPTION(TypeError() << errinfo_comment("Object too large for storage.")); + BOOST_THROW_EXCEPTION(Error(Error::Type::TypeError) << errinfo_comment("Object too large for storage.")); offsets[i] = make_pair(u256(slotOffset), byteOffset); solAssert(type->storageSize() >= 1, "Invalid storage size."); if (type->storageSize() == 1 && byteOffset + type->storageBytes() <= 32) @@ -64,7 +64,7 @@ void StorageOffsets::computeOffsets(TypePointers const& _types) if (byteOffset > 0) ++slotOffset; if (slotOffset >= bigint(1) << 256) - BOOST_THROW_EXCEPTION(TypeError() << errinfo_comment("Object too large for storage.")); + BOOST_THROW_EXCEPTION(Error(Error::Type::TypeError) << errinfo_comment("Object too large for storage.")); m_storageSize = u256(slotOffset); swap(m_offsets, offsets); } @@ -805,7 +805,7 @@ u256 ArrayType::storageSize() const else size = bigint(length()) * baseType()->storageSize(); if (size >= bigint(1) << 256) - BOOST_THROW_EXCEPTION(TypeError() << errinfo_comment("Array too large for storage.")); + BOOST_THROW_EXCEPTION(Error(Error::Type::TypeError) << errinfo_comment("Array too large for storage.")); return max<u256>(1, u256(size)); } |