Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (!currentDepth) {
currentDepth = 0;
}
if (currentDepth >= maxDepth) {
return;
}
indent = '';
for (var i = 0; i < currentDepth; i++) {
indent += ' ';
}
currentDepth++;
VError.errorForEach(error, function (e) {
console.error(indent, '-', e.message);
if (e.cause()) {
printVErrorIter(e.cause(), maxDepth, currentDepth);
}
});
}