Browse Source

bench: Fail gracefully if function_call binding fails

v0.9.11-release
isaacs 12 years ago
parent
commit
7658f4c29c
  1. 11
      benchmark/misc/function_call/index.js

11
benchmark/misc/function_call/index.js

@ -6,7 +6,16 @@
var assert = require('assert');
var common = require('../../common.js');
var binding = require('./build/Release/binding');
// this fails when we try to open with a different version of node,
// which is quite common for benchmarks. so in that case, just
// abort quietly.
try {
var binding = require('./build/Release/binding');
} catch (er) {
console.error('misc/function_call.js Binding failed to load');
process.exit(0);
}
var cxx = binding.hello;
var c = 0;

Loading…
Cancel
Save