diff options
author | chriseth <c@ethdev.com> | 2015-06-06 07:04:55 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-06-07 18:51:15 +0800 |
commit | c2a9419e495e931a825e8146aec49ffc34e44954 (patch) | |
tree | a6674b16ad95fe108794e305abddc7981c1bed79 /ArrayUtils.cpp | |
parent | b51ef4a357b4b60fc01038b0e97280fb9ecca01e (diff) | |
download | dexon-solidity-c2a9419e495e931a825e8146aec49ffc34e44954.tar.gz dexon-solidity-c2a9419e495e931a825e8146aec49ffc34e44954.tar.zst dexon-solidity-c2a9419e495e931a825e8146aec49ffc34e44954.zip |
Improved "Stack too deep" error message.
Closes #2080.
Diffstat (limited to 'ArrayUtils.cpp')
-rw-r--r-- | ArrayUtils.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ArrayUtils.cpp b/ArrayUtils.cpp index 531ab8af..b770b815 100644 --- a/ArrayUtils.cpp +++ b/ArrayUtils.cpp @@ -168,7 +168,10 @@ void ArrayUtils::copyArrayToStorage(ArrayType const& _targetType, ArrayType cons else solAssert(false, "Copying of unknown type requested: " + sourceBaseType->toString()); // stack: target_ref target_data_end source_data_pos target_data_pos source_data_end [target_byte_offset] [source_byte_offset] <source_value>... - solAssert(2 + byteOffsetSize + sourceBaseType->getSizeOnStack() <= 16, "Stack too deep."); + solAssert( + 2 + byteOffsetSize + sourceBaseType->getSizeOnStack() <= 16, + "Stack too deep, try removing local variables." + ); // fetch target storage reference m_context << eth::dupInstruction(2 + byteOffsetSize + sourceBaseType->getSizeOnStack()); if (haveByteOffsetTarget) |