Skip to content

Commit

Permalink
fix #3469
Browse files Browse the repository at this point in the history
Manually apply commit: 25528ae
  • Loading branch information
swrdfish committed May 16, 2023
1 parent dfb5cc3 commit 72298dd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lib/core/treenode.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const EventEmitter = require('events');
const Utils = require('../utils');
const Debuggability = require('../utils/debuggability.js');

class TreeNode {
get command() {
Expand Down Expand Up @@ -114,6 +115,11 @@ class TreeNode {

handleError(err) {
err.abortOnFailure = err.abortOnFailure || err.abortOnFailure === undefined;

// Set abortOnFailure to false when command is being executed in debugMode
if (Debuggability.debugMode) {
err.abortOnFailure = false;
}
let errorName = err.name !== 'Error' ? `[${err.name}] ` : '';
let originalError = `${errorName}${err.message}`;

Expand Down
10 changes: 9 additions & 1 deletion lib/utils/debuggability.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ class Debuggability {
static set stepOverAndPause(value) {
this._stepOverAndPause = value;
}


static get debugMode() {
return this._debugMode;
}

static set debugMode(value) {
this._debugMode = value;
}

static reset() {
this._stepOverAndPause = false;
}
Expand Down

0 comments on commit 72298dd

Please sign in to comment.