diff --git a/benchmark/sqlite/sqlite-is-transaction.js b/benchmark/sqlite/sqlite-is-transaction.js index 3bfc896cf91c..dca31a18d986 100644 --- a/benchmark/sqlite/sqlite-is-transaction.js +++ b/benchmark/sqlite/sqlite-is-transaction.js @@ -16,14 +16,14 @@ function main(conf) { } let i; - let deadCodeElimination = true; + let deadCodeElimination; bench.start(); for (i = 0; i < conf.n; i += 1) - deadCodeElimination &&= db.isTransaction; + deadCodeElimination = db.isTransaction; bench.end(conf.n); - assert.ok(deadCodeElimination === (conf.transaction === 'true')); + assert.strictEqual(deadCodeElimination, conf.transaction === 'true'); if (conf.transaction === 'true') { db.exec('ROLLBACK'); diff --git a/doc/api/repl.md b/doc/api/repl.md index c384ebf13913..7a57af574422 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -232,6 +232,15 @@ undefined undefined ``` +### Error handling + +By default, uncaught exceptions in the REPL are printed to the output stream +(as with `Uncaught Error: REPL await` above). `uncaughtException` listeners +can be added freely in both standalone and nested REPLs. The `handleError` +option of [`repl.start()`][] can customize this behavior, including +forwarding exceptions to [`'uncaughtException'`][] by returning +`'unhandled'`. + ### Reverse-i-search