Class ErrorReporter
java.lang.Object
megalodonte.application.ErrorReporter
Central error handler for the framework. Unhandled exceptions from
Async and Scope
are routed here.
Applications should register a UI-specific handler via register(ErrorReporter.Handler) at
bootstrap time. If none is registered, a fallback prints to stderr.
All errors are also appended to ~/.megalodonte/errors.log for
post-mortem analysis.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFunctional interface for error handling callbacks. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidReports an error by logging it to file and delegating to the registered handler.static voidregister(ErrorReporter.Handler appHandler) Registers the application-specific error handler.
-
Method Details
-
register
Registers the application-specific error handler. Called once at bootstrap.- Parameters:
appHandler- the error handler implementation
-
handle
Reports an error by logging it to file and delegating to the registered handler.- Parameters:
t- the throwable to report
-