Class StepExecutionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.zemco.codegame.execution.engine.StepExecutionException
- All Implemented Interfaces:
Serializable
Thrown when an exception is thrown during instruction execution while engine is doing a step.
- Author:
- Erik Zemčík
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStepExecutionException(String message, Throwable cause, int linePosition) Creates an instance ofStepExecutionException. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the zero-based line position related to the executed instruction.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
StepExecutionException
Creates an instance ofStepExecutionException.- Parameters:
message- detail message containing information about the state of the executioncause- exception thrown by instruction during executionlinePosition- zero-based index of the line that was executed- Throws:
IllegalArgumentException- iflinePositionis not a positive integer
-
-
Method Details
-
getLinePosition
public int getLinePosition()Returns the zero-based line position related to the executed instruction.- Returns:
- zero-based line position
-