fix: Report build errors to dev console (#36540)
This commit is contained in:
committed by
mrugesh
parent
8d0c027fa4
commit
052e30aff3
@ -31,7 +31,8 @@ const __utils = (() => {
|
||||
}
|
||||
|
||||
return {
|
||||
postResult
|
||||
postResult,
|
||||
oldLog
|
||||
};
|
||||
})();
|
||||
|
||||
@ -54,7 +55,12 @@ self.onmessage = async e => {
|
||||
`);
|
||||
} catch (err) {
|
||||
if (__userCodeWasExecuted) {
|
||||
// rethrow error, since test failed.
|
||||
throw err;
|
||||
} else {
|
||||
// report errors to dev console (not the editor console, since the test
|
||||
// may still pass)
|
||||
__utils.oldLog(err);
|
||||
}
|
||||
testResult = eval(e.data.testString);
|
||||
}
|
||||
|
Reference in New Issue
Block a user