From 90c5285fcf9787ced389dc3e370706feef171435 Mon Sep 17 00:00:00 2001 From: "bhavesh.p" Date: Sun, 3 Dec 2023 13:28:30 +0530 Subject: [PATCH] error managed in run_stdin example --- examples/run_stdin.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/run_stdin.js b/examples/run_stdin.js index c56fc8f..9211746 100644 --- a/examples/run_stdin.js +++ b/examples/run_stdin.js @@ -31,6 +31,9 @@ var previousKey, CTRL_Q = '\u0011'; function handler(err, container) { + //Check error and thow it + if(err) throw new Error(err); + var attach_opts = {stream: true, stdin: true, stdout: true, stderr: true}; container.attach(attach_opts, function handler(err, stream) {