Skip to content

Commit

Permalink
fix(svoprocessor): fix a minor issue in error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentinTh committed Jan 11, 2022
1 parent 8232f15 commit e534400
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/SVOProcessor.js
Expand Up @@ -18,11 +18,6 @@ class SVOProcessor {

#isInfosPrinted;

constructor() {
this.#initProgressBar();
this.#isInfosPrinted = false;
}

get progressBar() {
return this.#progressBar;
}
Expand All @@ -31,6 +26,11 @@ class SVOProcessor {
this.#argv = argv;
}

constructor() {
this.#initProgressBar();
this.#isInfosPrinted = false;
}

#initProgressBar() {
this.#progressBar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);
this.#maxProgressValue = 0;
Expand Down Expand Up @@ -276,12 +276,11 @@ class SVOProcessor {
bar: this.#progressBar
});
} catch (error) {
// ConsoleHelper.printMessage(
// Tags.ERROR,
// `Error occurs while processing ${filePath}`,
// error
// );
console.log(error);
ConsoleHelper.printMessage(
Tags.ERROR,
`Error occurs while processing ${filePath}`,
error
);
process.exit(1);
}

Expand Down

0 comments on commit e534400

Please sign in to comment.