Class BasicErrorReporter

java.lang.Object
com.comphenix.protocol.error.BasicErrorReporter
All Implemented Interfaces:
ErrorReporter

public class BasicErrorReporter extends Object implements ErrorReporter
Represents a basic error reporter that prints error reports to the standard error stream.

Note that this implementation doesn't distinguish between reportWarning(Object, Report) and reportDetailed(Object, Report) - they both have the exact same behavior.

  • Constructor Details

    • BasicErrorReporter

      public BasicErrorReporter()
      Construct a new basic error reporter that prints directly the standard error stream.
    • BasicErrorReporter

      public BasicErrorReporter(PrintStream output)
      Construct a error reporter that prints to the given output stream.
      Parameters:
      output - - the output stream.
  • Method Details

    • reportMinimal

      public void reportMinimal(org.bukkit.plugin.Plugin sender, String methodName, Throwable error)
      Description copied from interface: ErrorReporter
      Prints a small minimal error report regarding an exception from another plugin.
      Specified by:
      reportMinimal in interface ErrorReporter
      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: ErrorReporter
      Prints a small minimal error report regarding an exception from another plugin.
      Specified by:
      reportMinimal in interface ErrorReporter
      Parameters:
      sender - - the other plugin.
      methodName - - name of the caller method.
      error - - the exception itself.
      parameters - - any relevant parameters to print.
    • reportDebug

      public void reportDebug(Object sender, Report report)
      Description copied from interface: ErrorReporter
      Prints a debug message from the current sender.

      Most users will not see this message.

      Specified by:
      reportDebug in interface ErrorReporter
      Parameters:
      sender - - the sender.
      report - - the report.
    • reportDebug

      public void reportDebug(Object sender, Report.ReportBuilder builder)
      Description copied from interface: ErrorReporter
      Prints a debug message from the current sender.
      Specified by:
      reportDebug in interface ErrorReporter
      Parameters:
      sender - - the sender.
      builder - - the report builder.
    • reportWarning

      public void reportWarning(Object sender, Report report)
      Description copied from interface: ErrorReporter
      Prints a warning message from the current plugin.
      Specified by:
      reportWarning in interface ErrorReporter
      Parameters:
      sender - - the object containing the caller method.
      report - - an error report to include.
    • reportWarning

      public void reportWarning(Object sender, Report.ReportBuilder reportBuilder)
      Description copied from interface: ErrorReporter
      Prints a warning message from the current plugin.
      Specified by:
      reportWarning in interface ErrorReporter
      Parameters:
      sender - - the object containing the caller method.
      reportBuilder - - an error report builder that will be used to get the report.
    • reportDetailed

      public void reportDetailed(Object sender, Report report)
      Description copied from interface: ErrorReporter
      Prints a detailed error report about an unhandled exception.
      Specified by:
      reportDetailed in interface ErrorReporter
      Parameters:
      sender - - the object containing the caller method.
      report - - an error report to include.
    • reportDetailed

      public void reportDetailed(Object sender, Report.ReportBuilder reportBuilder)
      Description copied from interface: ErrorReporter
      Prints a detailed error report about an unhandled exception.
      Specified by:
      reportDetailed in interface ErrorReporter
      Parameters:
      sender - - the object containing the caller method.
      reportBuilder - - an error report builder that will be used to get the report.