diff options
Diffstat (limited to 'packages/sol-compiler')
-rw-r--r-- | packages/sol-compiler/src/compiler.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts index ff3805073..9a6dcff09 100644 --- a/packages/sol-compiler/src/compiler.ts +++ b/packages/sol-compiler/src/compiler.ts @@ -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; |