raise error for unknown compiler version
This commit is contained in:
parent
7c96fa45f8
commit
8959b0993e
@ -85,6 +85,9 @@ export class Compiler {
|
|||||||
private static async _getSolcAsync(
|
private static async _getSolcAsync(
|
||||||
solcVersion: string,
|
solcVersion: string,
|
||||||
): Promise<{ solcInstance: solc.SolcInstance; fullSolcVersion: string }> {
|
): Promise<{ solcInstance: solc.SolcInstance; fullSolcVersion: string }> {
|
||||||
|
if (_.isUndefined(binPaths[solcVersion])) {
|
||||||
|
throw new Error(`${solcVersion} is not a known compiler version`);
|
||||||
|
}
|
||||||
const fullSolcVersion = binPaths[solcVersion];
|
const fullSolcVersion = binPaths[solcVersion];
|
||||||
const compilerBinFilename = path.join(SOLC_BIN_DIR, fullSolcVersion);
|
const compilerBinFilename = path.join(SOLC_BIN_DIR, fullSolcVersion);
|
||||||
let solcjs: string;
|
let solcjs: string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user