Skip to content

Error handling overview

ElfUI's error handling is divided into four layers:

HierarchyAPI
Component CaptureonErrorCaptured
Error BoundaryerrorBoundary / captureError
Global processingcreateApp(App).config.{ errorHandler, warnHandler }
Compilation DiagnosticsVite Plug-in and Macro Compiler Diagnostics

Business components prioritize locally handling recoverable errors. The global handler is suitable for log reporting and in-depth reminders.