Skip to content
This repository was archived by the owner on Jan 5, 2019. It is now read-only.

Commit d1d4959

Browse files
committed
Don't silently swallow async errors
1 parent 2264295 commit d1d4959

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/evm2wasm.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ try {
7676
convert(bytecode, { wast: wast, trace: trace, chargePerOp: chargePerOp }).then((result) => {
7777
storeOrPrintResult(result, outputFile)
7878
}).catch((err) => {
79-
throw err
79+
// Separately handle async promise errors here so they're not swallowed silently
80+
console.error('Error:' + err)
81+
process.exit(1)
8082
})
8183
} catch (err) {
8284
console.error('Error: ' + err)

0 commit comments

Comments
 (0)