mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
CommonIO: Make readFile() check if the file is not a directory and if not fail with a sensible exception rather than std::length_error
This commit is contained in:
@@ -148,6 +148,11 @@ Allowed options)",
|
||||
cerr << "File not found: " << path << endl;
|
||||
return 1;
|
||||
}
|
||||
catch (NotAFile const&)
|
||||
{
|
||||
cerr << "Not a regular file: " << path << endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
input = readStandardInput();
|
||||
|
||||
Reference in New Issue
Block a user