Home / Function/ logErrors() — react Function Reference

logErrors() — react Function Reference

Architecture documentation for the logErrors() function in Environment.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  702fa0b8_ba8c_390e_cde1_4dca39712628["logErrors()"]
  cba0c8a2_0db5_48e2_0d19_b2c6a46799e8["Environment"]
  702fa0b8_ba8c_390e_cde1_4dca39712628 -->|defined in| cba0c8a2_0db5_48e2_0d19_b2c6a46799e8
  c3bc3875_256f_8f5e_7800_2f9c5bae65eb["runWithEnvironment()"]
  c3bc3875_256f_8f5e_7800_2f9c5bae65eb -->|calls| 702fa0b8_ba8c_390e_cde1_4dca39712628
  46bdf8e6_4a50_0326_ba9a_f74ee3cfc291["isOk()"]
  702fa0b8_ba8c_390e_cde1_4dca39712628 -->|calls| 46bdf8e6_4a50_0326_ba9a_f74ee3cfc291
  7dd8eefb_2237_6426_9d5d_a2c0267dc003["unwrapErr()"]
  702fa0b8_ba8c_390e_cde1_4dca39712628 -->|calls| 7dd8eefb_2237_6426_9d5d_a2c0267dc003
  style 702fa0b8_ba8c_390e_cde1_4dca39712628 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts lines 945–956

  logErrors(errors: Result<void, CompilerError>): void {
    if (errors.isOk() || this.logger == null) {
      return;
    }
    for (const error of errors.unwrapErr().details) {
      this.logger.logEvent(this.filename, {
        kind: 'CompileError',
        detail: error,
        fnLoc: null,
      });
    }
  }

Subdomains

Frequently Asked Questions

What does logErrors() do?
logErrors() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts.
Where is logErrors() defined?
logErrors() is defined in compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts at line 945.
What does logErrors() call?
logErrors() calls 2 function(s): isOk, unwrapErr.
What calls logErrors()?
logErrors() is called by 1 function(s): runWithEnvironment.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free