Package de.Keyle.MyPet.api.util
Interface ErrorReporter
public interface ErrorReporter
Receives the errors MyPet catches, so they can be reported somewhere useful.
-
Method Summary
-
Method Details
-
onEnable
void onEnable()Starts reporting. Called as MyPet enables. -
onDisable
void onDisable()Stops reporting and flushes anything pending. Called as MyPet disables. -
sendError
Reports one error.This is the preferred route: it carries the context lines as breadcrumbs. An implementation that also captures logged exceptions must treat a throwable passed here as already reported and must not capture it a second time when it is logged afterwards. A caller that both reports and logs an error therefore has to call this method before logging it (as
ErrorUtildoes), so the report is recorded before any log-based capture sees it.- Parameters:
t- the error to reportcontext- extra lines describing what MyPet was doing
-