Interface RuntimeErrorConsumer
- All Known Implementing Classes:
BukkitRuntimeErrorConsumer
,RuntimeErrorCatcher
public interface RuntimeErrorConsumer
Consumes runtime errors. Some use cases include printing errors to console or redirecting to a Discord channel.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable RuntimeErrorFilter
void
printError
(RuntimeError error) Prints a single error with all its information.void
printFrameOutput
(Frame.FrameOutput output, Level level) Prints the output of a frame, including skipped errors, timeouts, and whatever other information required.
-
Method Details
-
printError
Prints a single error with all its information.- Parameters:
error
- The error to print.
-
getFilter
- Returns:
- The filter to use when checking if this consumer should print an error. Defaults to the standard
config-driven filter. If no filter should be used, return
RuntimeErrorFilter.NO_FILTER
. This value MUST be effectively final.
-
printFrameOutput
Prints the output of a frame, including skipped errors, timeouts, and whatever other information required.- Parameters:
output
- An output object containing unmodifiable views of the frame data.level
- The severity of this frame (error vs warning).
-