Class ResultException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.sympho.modular_commands.api.exception.CommandException
dev.sympho.modular_commands.api.exception.ResultException
- All Implemented Interfaces:
Serializable
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 Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ResultException
Creates a new instance.- Parameters:
result
- The result of execution.
-
-
Method Details
-
getResult
Retrieves the execution result.- Returns:
- The execution result.
-