Skip to content

Commit

Permalink
Fixed exception in case that the connector cannot be found (MID-3251)
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Aug 31, 2016
1 parent 7505438 commit bb7ff15
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -265,7 +265,14 @@ private ConnectorInstance getConnectorInstance(OperationResult parentResult)
ConnectorInstance connector = connectorManager.getConfiguredConnectorInstance(getResource().asPrismObject(), false, parentResult);
connectorResult.recordSuccess();
return connector;
} catch (ObjectNotFoundException | SchemaException | CommunicationException | ConfigurationException | SystemException e){
} catch (ObjectNotFoundException | SchemaException e){
connectorResult.recordPartialError("Could not get connector instance " + getDesc() + ": " + e.getMessage(), e);
// Wrap those exceptions to a configuration exception. In the context of the provisioning operation we really cannot throw
// ObjectNotFoundException exception. If we do that then the consistency code will interpret that as if the resource object
// (shadow) is missing. But that's wrong. We do not have connector therefore we do not know anything about the shadow. We cannot
// throw ObjectNotFoundException here.
throw new ConfigurationException(e.getMessage(), e);
} catch (CommunicationException | ConfigurationException | SystemException e){
connectorResult.recordPartialError("Could not get connector instance " + getDesc() + ": " + e.getMessage(), e);
throw e;
}
Expand Down

0 comments on commit bb7ff15

Please sign in to comment.