mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2440 from ethereum/lll-include
LLL: better error reporting in (include)
This commit is contained in:
commit
0868a50eb1
@ -192,7 +192,13 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s)
|
||||
{
|
||||
if (_t.size() != 2)
|
||||
error<IncorrectParameterCount>();
|
||||
m_asm.append(CodeFragment::compile(contentsString(firstAsString()), _s).m_asm);
|
||||
string fileName = firstAsString();
|
||||
if (fileName.empty())
|
||||
error<InvalidName>("Empty file name provided");
|
||||
string contents = contentsString(fileName);
|
||||
if (contents.empty())
|
||||
error<InvalidName>(std::string("File not found (or empty): ") + fileName);
|
||||
m_asm.append(CodeFragment::compile(contents, _s).m_asm);
|
||||
}
|
||||
else if (us == "SET")
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user