raise error for unknown compiler version

This commit is contained in:
F. Eugene Aumson 2018-08-15 13:38:41 -07:00
parent 7c96fa45f8
commit 8959b0993e

View File

@ -85,6 +85,9 @@ export class Compiler {
private static async _getSolcAsync(
solcVersion: 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 compilerBinFilename = path.join(SOLC_BIN_DIR, fullSolcVersion);
let solcjs: string;