Skip to content

Commit

Permalink
fix: bugsnag errors like Unknown exec function received htmlLint
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed Sep 13, 2024
1 parent 8f91a54 commit 2d1c368
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/extensions/default/CSSCodeHints/css-lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ define(function (require, exports, module) {
resolve({ errors: lintResult });
}
resolve();
}).catch(err=>{
console.error("CSS Lint failed:", err);
reject(new Error("CSS Lint failed as CSS Lint plugin is not yet loaded. Please try again."));
});
});
}
Expand Down
3 changes: 3 additions & 0 deletions src/extensions/default/HTMLCodeHints/html-lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ define(function (require, exports, module) {
resolve({ errors: lintResult });
}
resolve();
}).catch(err=>{
console.error("HTML Lint failed:", err);
reject(new Error("HTML Lint failed as HTML plugin is not yet loaded. Please try again."));
});
});
}
Expand Down
5 changes: 4 additions & 1 deletion src/extensions/default/JSLint/JSHint.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ define(function (require, exports, module) {
* a gold star when no errors are found.
*/
async function lintOneFile(text, _fullPath) {
return new Promise((resolve)=>{
return new Promise((resolve, reject)=>{
if(jsHintConfigFileErrorMessage){
resolve({ errors: _getLinterConfigFileErrorMsg() });
return;
Expand Down Expand Up @@ -118,6 +118,9 @@ define(function (require, exports, module) {
resolve({ errors: errors });
}
resolve();
}).catch(err=>{
console.error("JSHint failed:", err);
reject(new Error("JSHint failed as JSHint plugin is not yet loaded. Please try again."));
});
});
}
Expand Down

0 comments on commit 2d1c368

Please sign in to comment.