Search in sources :

Example 6 with SwitchManagerException

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());
}
Also used : SwitchManagerException(org.openkilda.wfm.topology.switchmanager.error.SwitchManagerException)

Aggregations

SwitchManagerException (org.openkilda.wfm.topology.switchmanager.error.SwitchManagerException)6