debugger: improve ESRCH error message
authorJackson Tian <puling.tyq@alibaba-inc.com>
Mon, 1 Jun 2015 14:12:25 +0000 (22:12 +0800)
committerBen Noordhuis <info@bnoordhuis.nl>
Fri, 5 Jun 2015 03:54:19 +0000 (05:54 +0200)
commit81029c639ad5aa566d9ff25d31f73ef279ad2b8d
treeef5e22133e57893ddf8605ef23eb66a009a6a3e1
parent353e26e3c7ed9d160028ea7517d05edbebab5e7d
debugger: improve ESRCH error message

When using `iojs debug -p <pid>` with an invalid pid, the debugger
printed an internal error message because it wasn't smart enough
to figure out that the target process didn't exist.  Now it is.

PR-URL: https://github.com/nodejs/io.js/pull/1863
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
lib/_debugger.js
test/debugger/test-debugger-pid.js [new file with mode: 0644]