From 31ad4d06bf7b0217e6b69fa198a7624a2ba87b59 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 10 Jan 2017 12:37:36 +0100 Subject: [PATCH] fix failing test --- test/solidity/localsTests/helper.js | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/test/solidity/localsTests/helper.js b/test/solidity/localsTests/helper.js index 48e24de9e6..b5b8e1fc0d 100644 --- a/test/solidity/localsTests/helper.js +++ b/test/solidity/localsTests/helper.js @@ -5,18 +5,22 @@ var localDecoder = require('../../../babelify-src/solidity/localDecoder') Decode local variable */ function decodeLocal (st, index, traceManager, callTree, verifier) { - traceManager.waterfall([ - traceManager.getStackAt, - traceManager.getMemoryAt], - index, - function (error, result) { - if (!error) { - var locals = localDecoder.solidityLocals(index, callTree, result[0].value, result[1].value) - verifier(locals) - } else { - st.fail(error) - } - }) + try { + traceManager.waterfall([ + traceManager.getStackAt, + traceManager.getMemoryAt], + index, + function (error, result) { + if (!error) { + var locals = localDecoder.solidityLocals(index, callTree, result[0].value, result[1].value) + verifier(locals) + } else { + st.fail(error) + } + }) + } catch (e) { + st.fail(e.message) + } } module.exports = {