Class StateNotFoundException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.github.jspinak.brobot.exception.BrobotRuntimeException
io.github.jspinak.brobot.exception.StateNotFoundException
- All Implemented Interfaces:
Serializable
Thrown when a requested state cannot be found in the state management system.
This exception indicates that the framework attempted to access or transition to a state that doesn't exist in the current state model. This is a critical error in model-based automation as it suggests either a configuration problem or that the application is in an unexpected state.
- Since:
- 1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStateNotFoundException
(String stateName) Constructs a new state not found exception.StateNotFoundException
(String stateName, String context) Constructs a new state not found exception with additional context. -
Method Summary
Modifier and TypeMethodDescriptionGets the name of the state that could not be found.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
StateNotFoundException
Constructs a new state not found exception.- Parameters:
stateName
- the name of the state that could not be found
-
StateNotFoundException
Constructs a new state not found exception with additional context.- Parameters:
stateName
- the name of the state that could not be foundcontext
- additional context about where the state was expected
-
-
Method Details
-
getStateName
Gets the name of the state that could not be found.- Returns:
- the state name
-