|
1 | 1 | 'use strict'; |
2 | 2 |
|
| 3 | +const internalUtil = require('internal/util'); |
3 | 4 | const util = require('util'); |
4 | 5 | const path = require('path'); |
5 | 6 | const net = require('net'); |
@@ -31,8 +32,8 @@ exports.start = function(argv, stdin, stdout) { |
31 | 32 | stdin.resume(); |
32 | 33 |
|
33 | 34 | process.on('uncaughtException', function(e) { |
34 | | - console.error("There was an internal error in Node's debugger. " + |
35 | | - 'Please report this bug.'); |
| 35 | + internalUtil.error('There was an internal error in Node\'s debugger. ' + |
| 36 | + 'Please report this bug.'); |
36 | 37 | console.error(e.message); |
37 | 38 | console.error(e.stack); |
38 | 39 | if (interface_.child) interface_.child.kill(); |
@@ -520,7 +521,7 @@ Client.prototype.mirrorObject = function(handle, depth, cb) { |
520 | 521 | cb = cb || function() {}; |
521 | 522 | this.reqLookup(propertyRefs, function(err, res) { |
522 | 523 | if (err) { |
523 | | - console.error('problem with reqLookup'); |
| 524 | + internalUtil.error('problem with reqLookup'); |
524 | 525 | cb(null, handle); |
525 | 526 | return; |
526 | 527 | } |
@@ -1668,7 +1669,7 @@ Interface.prototype.trySpawn = function(cb) { |
1668 | 1669 | process._debugProcess(pid); |
1669 | 1670 | } catch (e) { |
1670 | 1671 | if (e.code === 'ESRCH') { |
1671 | | - console.error(`Target process: ${pid} doesn't exist.`); |
| 1672 | + internalUtil.error(`Target process: ${pid} doesn't exist.`); |
1672 | 1673 | process.exit(1); |
1673 | 1674 | } |
1674 | 1675 | throw e; |
@@ -1737,7 +1738,7 @@ Interface.prototype.trySpawn = function(cb) { |
1737 | 1738 | function connectError() { |
1738 | 1739 | // If it's failed to connect 10 times then print failed message |
1739 | 1740 | if (connectionAttempts >= 10) { |
1740 | | - console.error(' failed, please retry'); |
| 1741 | + internalUtil.error(' failed to connect, please retry'); |
1741 | 1742 | process.exit(1); |
1742 | 1743 | } |
1743 | 1744 | setTimeout(attemptConnect, 500); |
|
0 commit comments