printErrorMessage() — react Function Reference
Architecture documentation for the printErrorMessage() function in CompilerError.ts from the react codebase.
Entity Profile
Dependency Diagram
graph TD 87c7e084_efd0_e72a_89ba_0eea447fbc45["printErrorMessage()"] 7cb692eb_ba8e_04dc_5f67_df48b332c3c1["CompilerErrorDetail"] 87c7e084_efd0_e72a_89ba_0eea447fbc45 -->|defined in| 7cb692eb_ba8e_04dc_5f67_df48b332c3c1 e39dece3_8891_8533_6625_5397539eb098["printErrorMessage()"] e39dece3_8891_8533_6625_5397539eb098 -->|calls| 87c7e084_efd0_e72a_89ba_0eea447fbc45 34f66651_e581_e609_943e_35ffa0dc79f5["printErrorMessage()"] 34f66651_e581_e609_943e_35ffa0dc79f5 -->|calls| 87c7e084_efd0_e72a_89ba_0eea447fbc45 4767de0a_dba6_b3df_77df_2b909825c02d["printErrorSummary()"] 87c7e084_efd0_e72a_89ba_0eea447fbc45 -->|calls| 4767de0a_dba6_b3df_77df_2b909825c02d 073c81a5_c389_d108_5b8f_4d6dc6eece83["push()"] 87c7e084_efd0_e72a_89ba_0eea447fbc45 -->|calls| 073c81a5_c389_d108_5b8f_4d6dc6eece83 c4a899b9_3ed3_b9e8_fdb0_decfd5276099["printCodeFrame()"] 87c7e084_efd0_e72a_89ba_0eea447fbc45 -->|calls| c4a899b9_3ed3_b9e8_fdb0_decfd5276099 34f66651_e581_e609_943e_35ffa0dc79f5["printErrorMessage()"] 87c7e084_efd0_e72a_89ba_0eea447fbc45 -->|calls| 34f66651_e581_e609_943e_35ffa0dc79f5 style 87c7e084_efd0_e72a_89ba_0eea447fbc45 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
compiler/packages/babel-plugin-react-compiler/src/CompilerError.ts lines 259–282
printErrorMessage(source: string, options: PrintErrorMessageOptions): string {
const buffer = [printErrorSummary(this.category, this.reason)];
if (this.description != null) {
buffer.push(`\n\n${this.description}.`);
}
const loc = this.loc;
if (loc != null && typeof loc !== 'symbol') {
let codeFrame: string;
try {
codeFrame = printCodeFrame(source, loc, this.reason);
} catch (e) {
codeFrame = '';
}
buffer.push(`\n\n`);
if (loc.filename != null) {
const line = loc.start.line;
const column = options.eslint ? loc.start.column + 1 : loc.start.column;
buffer.push(`${loc.filename}:${line}:${column}\n`);
}
buffer.push(codeFrame);
buffer.push('\n\n');
}
return buffer.join('');
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does printErrorMessage() do?
printErrorMessage() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/CompilerError.ts.
Where is printErrorMessage() defined?
printErrorMessage() is defined in compiler/packages/babel-plugin-react-compiler/src/CompilerError.ts at line 259.
What does printErrorMessage() call?
printErrorMessage() calls 4 function(s): printCodeFrame, printErrorMessage, printErrorSummary, push.
What calls printErrorMessage()?
printErrorMessage() is called by 2 function(s): printErrorMessage, printErrorMessage.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free