use of com.yahoo.vespa.clustercontroller.utils.staterestapi.errors.StateRestApiException in project vespa by vespa-engine.
the class Request method doRemoteFleetControllerTask.
@Override
public final void doRemoteFleetControllerTask(Context context) {
try {
if (masterState == MasterState.MUST_BE_MASTER && !context.masterInfo.isMaster()) {
Integer masterIndex = context.masterInfo.getMaster();
if (masterIndex == null)
throw new UnknownMasterException();
throw new OtherMasterIndexException(masterIndex);
}
result = calculateResult(context);
resultSet = true;
} catch (OtherMasterIndexException | StateRestApiException e) {
failure = e;
} catch (Exception e) {
failure = new InternalFailure("Caught unexpected exception");
failure.initCause(e);
}
}
use of com.yahoo.vespa.clustercontroller.utils.staterestapi.errors.StateRestApiException in project vespa by vespa-engine.
the class DummyStateApi method checkForInducedException.
private void checkForInducedException() throws StateRestApiException {
if (induceException == null)
return;
Exception e = induceException;
induceException = null;
if (e instanceof RuntimeException) {
throw (RuntimeException) e;
}
throw (StateRestApiException) e;
}
Aggregations