Package com.comphenix.protocol.error
Class DelegatedErrorReporter
java.lang.Object
com.comphenix.protocol.error.DelegatedErrorReporter
- All Implemented Interfaces:
ErrorReporter
Construct an error reporter that delegates to another error reporter.
- Author:
- Kristian
-
Constructor Summary
ConstructorsConstructorDescriptionDelegatedErrorReporter(ErrorReporter delegated)Construct a new error reporter that forwards all reports to a given reporter. -
Method Summary
Modifier and TypeMethodDescriptionprotected ReportfilterReport(Object sender, Report report, boolean detailed)Invoked before an error report is passed on to the underlying error reporter.Retrieve the underlying error reporter.voidreportDebug(Object sender, Report report)Prints a debug message from the current sender.voidreportDebug(Object sender, Report.ReportBuilder builder)Prints a debug message from the current sender.voidreportDetailed(Object sender, Report report)Prints a detailed error report about an unhandled exception.voidreportDetailed(Object sender, Report.ReportBuilder reportBuilder)Prints a detailed error report about an unhandled exception.voidreportMinimal(org.bukkit.plugin.Plugin sender, String methodName, Throwable error)Prints a small minimal error report regarding an exception from another plugin.voidreportMinimal(org.bukkit.plugin.Plugin sender, String methodName, Throwable error, Object... parameters)Prints a small minimal error report regarding an exception from another plugin.voidreportWarning(Object sender, Report report)Prints a warning message from the current plugin.voidreportWarning(Object sender, Report.ReportBuilder reportBuilder)Prints a warning message from the current plugin.
-
Constructor Details
-
DelegatedErrorReporter
Construct a new error reporter that forwards all reports to a given reporter.- Parameters:
delegated- - the delegated reporter.
-
-
Method Details
-
getDelegated
Retrieve the underlying error reporter.- Returns:
- Underlying error reporter.
-
reportMinimal
Description copied from interface:ErrorReporterPrints a small minimal error report regarding an exception from another plugin.- Specified by:
reportMinimalin interfaceErrorReporter- Parameters:
sender- - the other plugin.methodName- - name of the caller method.error- - the exception itself.
-
reportMinimal
public void reportMinimal(org.bukkit.plugin.Plugin sender, String methodName, Throwable error, Object... parameters)Description copied from interface:ErrorReporterPrints a small minimal error report regarding an exception from another plugin.- Specified by:
reportMinimalin interfaceErrorReporter- Parameters:
sender- - the other plugin.methodName- - name of the caller method.error- - the exception itself.parameters- - any relevant parameters to print.
-
reportDebug
Description copied from interface:ErrorReporterPrints a debug message from the current sender.Most users will not see this message.
- Specified by:
reportDebugin interfaceErrorReporter- Parameters:
sender- - the sender.report- - the report.
-
reportWarning
Description copied from interface:ErrorReporterPrints a warning message from the current plugin.- Specified by:
reportWarningin interfaceErrorReporter- Parameters:
sender- - the object containing the caller method.report- - an error report to include.
-
reportDetailed
Description copied from interface:ErrorReporterPrints a detailed error report about an unhandled exception.- Specified by:
reportDetailedin interfaceErrorReporter- Parameters:
sender- - the object containing the caller method.report- - an error report to include.
-
filterReport
Invoked before an error report is passed on to the underlying error reporter.To cancel a report, return NULL.
- Parameters:
sender- - the sender instance or class.report- - the error report.detailed- - whether or not the report will be displayed in detail.- Returns:
- The report to pass on, or NULL to cancel it.
-
reportWarning
Description copied from interface:ErrorReporterPrints a warning message from the current plugin.- Specified by:
reportWarningin interfaceErrorReporter- Parameters:
sender- - the object containing the caller method.reportBuilder- - an error report builder that will be used to get the report.
-
reportDetailed
Description copied from interface:ErrorReporterPrints a detailed error report about an unhandled exception.- Specified by:
reportDetailedin interfaceErrorReporter- Parameters:
sender- - the object containing the caller method.reportBuilder- - an error report builder that will be used to get the report.
-
reportDebug
Description copied from interface:ErrorReporterPrints a debug message from the current sender.- Specified by:
reportDebugin interfaceErrorReporter- Parameters:
sender- - the sender.builder- - the report builder.
-