Class ExceptionConverterHelper

java.lang.Object
com.sk89q.worldedit.internal.command.exception.ExceptionConverterHelper
All Implemented Interfaces:
ExceptionConverter
Direct Known Subclasses:
WorldEditExceptionConverter

public abstract class ExceptionConverterHelper extends Object implements ExceptionConverter
An implementation of an ExceptionConverter that automatically calls the correct method defined on this object.

Only public methods will be used. Methods will be called in order of decreasing levels of inheritance (between classes where one inherits the other). For two different inheritance branches, the order between them is undefined.

  • Constructor Details

    • ExceptionConverterHelper

      public ExceptionConverterHelper()
  • Method Details

    • convert

      public void convert(Throwable t) throws org.enginehub.piston.exception.CommandException
      Description copied from interface: ExceptionConverter
      Attempt to convert the given throwable into a CommandException.

      If the exception is not recognized, then nothing should be thrown.

      Specified by:
      convert in interface ExceptionConverter
      Parameters:
      t - the throwable
      Throws:
      org.enginehub.piston.exception.CommandException - a command exception