mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-27 07:24:59 +00:00
display error when there is a unknown compilation error
This commit is contained in:
parent
ed8fe3a951
commit
80e8f6323a
@ -67,6 +67,10 @@ class Solidity {
|
||||
function createCompiledObject(output, callback) {
|
||||
let json = output.contracts;
|
||||
|
||||
if (!output || !output.contracts) {
|
||||
return callback(new Error("error compiling for unknown reasons"));
|
||||
}
|
||||
|
||||
if (Object.keys(output.contracts).length === 0 && output.sourceList.length > 0) {
|
||||
return callback(new Error("error compiling. There are sources available but no code could be compiled, likely due to fatal errors in the solidity code").message);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user