use of org.openkilda.wfm.topology.switchmanager.error.SwitchManagerException in project open-kilda by telstra.
the class SwitchValidateFsm method afterTransitionCausedException.
@Override
protected void afterTransitionCausedException(SwitchValidateState fromState, SwitchValidateState toState, SwitchValidateEvent event, SwitchValidateContext context) {
Throwable exception = getLastException().getTargetException();
SwitchManagerException error;
if (exception instanceof SwitchManagerException) {
error = (SwitchManagerException) exception;
} else {
error = new SwitchManagerException(exception);
}
setStatus(StateMachineStatus.IDLE);
fire(ERROR, SwitchValidateContext.builder().error(error).build());
}
Aggregations