diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-10-02 18:48:26 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-10-02 18:48:26 +0800 |
commit | cddfec27eef40c1bbf16e8d5881030b85e1082c8 (patch) | |
tree | d9ff5378a3cb53fc37d86cd47663c4acfaf3ba6c /liblll | |
parent | ba7c5d2305d3486ddd699637a881ee229627082f (diff) | |
download | dexon-solidity-cddfec27eef40c1bbf16e8d5881030b85e1082c8.tar dexon-solidity-cddfec27eef40c1bbf16e8d5881030b85e1082c8.tar.gz dexon-solidity-cddfec27eef40c1bbf16e8d5881030b85e1082c8.tar.bz2 dexon-solidity-cddfec27eef40c1bbf16e8d5881030b85e1082c8.tar.lz dexon-solidity-cddfec27eef40c1bbf16e8d5881030b85e1082c8.tar.xz dexon-solidity-cddfec27eef40c1bbf16e8d5881030b85e1082c8.tar.zst dexon-solidity-cddfec27eef40c1bbf16e8d5881030b85e1082c8.zip |
lll: better error reporting in some cases
Diffstat (limited to 'liblll')
-rw-r--r-- | liblll/CodeFragment.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp index 254f436f..5e60f964 100644 --- a/liblll/CodeFragment.cpp +++ b/liblll/CodeFragment.cpp @@ -103,7 +103,7 @@ CodeFragment::CodeFragment(sp::utree const& _t, CompilerState& _s, bool _allowAS { bigint i = *_t.get<bigint*>(); if (i < 0 || i > bigint(u256(0) - 1)) - error<IntegerOutOfRange>(); + error<IntegerOutOfRange>(toString(i)); m_asm.append((u256)i); break; } @@ -157,7 +157,7 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s) { auto i = *++_t.begin(); if (i.tag()) - error<InvalidName>(); + error<InvalidName>(toString(i)); if (i.which() == sp::utree_type::string_type) { auto sr = i.get<sp::basic_string<boost::iterator_range<char const*>, sp::utree_type::string_type>>(); @@ -244,7 +244,7 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s) if (ii == 1) { if (i.tag()) - error<InvalidName>(); + error<InvalidName>(toString(i)); if (i.which() == sp::utree_type::string_type) { auto sr = i.get<sp::basic_string<boost::iterator_range<char const*>, sp::utree_type::string_type>>(); @@ -303,11 +303,11 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s) { pos = CodeFragment(i, _s); if (pos.m_asm.deposit() != 1) - error<InvalidDeposit>(us); + error<InvalidDeposit>(toString(i)); } else if (i.tag() != 0) { - error<InvalidLiteral>(); + error<InvalidLiteral>(toString(i)); } else if (i.which() == sp::utree_type::string_type) { @@ -318,7 +318,7 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s) { bigint bi = *i.get<bigint*>(); if (bi < 0) - error<IntegerOutOfRange>(); + error<IntegerOutOfRange>(toString(i)); else { bytes tmp = toCompactBigEndian(bi); @@ -327,7 +327,7 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s) } else { - error<InvalidLiteral>(); + error<InvalidLiteral>(toString(i)); } ii++; |