Class ResultException

All Implemented Interfaces:
Serializable

public class ResultException extends CommandException
Exception that indicates that command execution finished.

Throwing it from within an execution handler has the same effect as returning the contained result.

Note that, to minimize the runtime overhead of using this exception, it does not record the stack trace or suppressed exceptions.

Since:
1.0
Version:
1.0
See Also:
API Note:
This exception is given as an alternative to directly returning the result for cases when some early completion occurs deep into the call stack, where it would be impractical to return a result normally. Returning the result directly is preferrable whenever possible.
  • Constructor Details

    • ResultException

      public ResultException(CommandResult result)
      Creates a new instance.
      Parameters:
      result - The result of execution.
  • Method Details

    • getResult

      public CommandResult getResult()
      Retrieves the execution result.
      Returns:
      The execution result.