mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Don't console.error in dev
Previously the PassManager would console.error if an unexpected error was thrown, to help with debugging jest. However because we now capture all invariants in compiler passes as bailouts, these are already captured in fixture tests. Additionally, we also already console.error if we find an unexpected bailout in a fixture test. So this is purely redundant and removing reduces some noise when running tests.
This commit is contained in:
@@ -38,10 +38,6 @@ export class PassManager {
|
||||
runPass(pass, this.program, this.context);
|
||||
} catch (e) {
|
||||
this.context.bailoutWithoutDiagnostic(`UnexpectedError: ${e}`);
|
||||
// console log stacktrace in jest
|
||||
if (global.__DEV__) {
|
||||
console.error(e.stack);
|
||||
}
|
||||
if (hasMutatedBabelAST) {
|
||||
// The AST has been mutated, we can't bail out anymore.
|
||||
throw e;
|
||||
|
||||
Reference in New Issue
Block a user