public class DelegatedErrorReporter extends java.lang.Object implements ErrorReporter
Constructor and Description |
---|
DelegatedErrorReporter(ErrorReporter delegated)
Construct a new error reporter that forwards all reports to a given reporter.
|
Modifier and Type | Method and Description |
---|---|
protected Report |
filterReport(java.lang.Object sender,
Report report,
boolean detailed)
Invoked before an error report is passed on to the underlying error reporter.
|
ErrorReporter |
getDelegated()
Retrieve the underlying error reporter.
|
void |
reportDetailed(java.lang.Object sender,
Report.ReportBuilder reportBuilder)
Prints a detailed error report about an unhandled exception.
|
void |
reportDetailed(java.lang.Object sender,
Report report)
Prints a detailed error report about an unhandled exception.
|
void |
reportMinimal(org.bukkit.plugin.Plugin sender,
java.lang.String methodName,
java.lang.Throwable error)
Prints a small minimal error report regarding an exception from another plugin.
|
void |
reportMinimal(org.bukkit.plugin.Plugin sender,
java.lang.String methodName,
java.lang.Throwable error,
java.lang.Object... parameters)
Prints a small minimal error report regarding an exception from another plugin.
|
void |
reportWarning(java.lang.Object sender,
Report.ReportBuilder reportBuilder)
Prints a warning message from the current plugin.
|
void |
reportWarning(java.lang.Object sender,
Report report)
Prints a warning message from the current plugin.
|
public DelegatedErrorReporter(ErrorReporter delegated)
delegated
- - the delegated reporter.public ErrorReporter getDelegated()
public void reportMinimal(org.bukkit.plugin.Plugin sender, java.lang.String methodName, java.lang.Throwable error)
ErrorReporter
reportMinimal
in interface ErrorReporter
sender
- - the other plugin.methodName
- - name of the caller method.error
- - the exception itself.public void reportMinimal(org.bukkit.plugin.Plugin sender, java.lang.String methodName, java.lang.Throwable error, java.lang.Object... parameters)
ErrorReporter
reportMinimal
in interface ErrorReporter
sender
- - the other plugin.methodName
- - name of the caller method.error
- - the exception itself.parameters
- - any relevant parameters to print.public void reportWarning(java.lang.Object sender, Report report)
ErrorReporter
reportWarning
in interface ErrorReporter
sender
- - the object containing the caller method.report
- - an error report to include.public void reportDetailed(java.lang.Object sender, Report report)
ErrorReporter
reportDetailed
in interface ErrorReporter
sender
- - the object containing the caller method.report
- - an error report to include.protected Report filterReport(java.lang.Object sender, Report report, boolean detailed)
To cancel a report, return NULL.
sender
- - the sender component.report
- - the error report.detailed
- - whether or not the report will be displayed in detail.public void reportWarning(java.lang.Object sender, Report.ReportBuilder reportBuilder)
ErrorReporter
reportWarning
in interface ErrorReporter
sender
- - the object containing the caller method.reportBuilder
- - an error report builder that will be used to get the report.public void reportDetailed(java.lang.Object sender, Report.ReportBuilder reportBuilder)
ErrorReporter
reportDetailed
in interface ErrorReporter
sender
- - the object containing the caller method.reportBuilder
- - an error report builder that will be used to get the report.