Skip to content

Commit

Permalink
Providing messages from unexpected ICF exceptions to upper layers.
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Sep 18, 2015
1 parent 4b465d6 commit 469df2b
Showing 1 changed file with 12 additions and 12 deletions.
Expand Up @@ -319,7 +319,7 @@ public void configure(PrismContainerValue<?> configuration, OperationResult pare
} else if (midpointEx instanceof Error) {
throw (Error) midpointEx;
} else {
throw new SystemException("Got unexpected exception: " + ex.getClass().getName(), ex);
throw new SystemException("Got unexpected exception: " + ex.getClass().getName() + ": " + ex.getMessage(), ex);
}
}

Expand Down Expand Up @@ -622,7 +622,7 @@ private void retrieveResourceSchema(List<QName> generateObjectClasses, Operation
throw (Error) midpointEx;
} else {
icfResult.recordFatalError(midpointEx.getMessage(), midpointEx);
throw new SystemException("Got unexpected exception: " + ex.getClass().getName(), ex);
throw new SystemException("Got unexpected exception: " + ex.getClass().getName() + ": " + ex.getMessage(), ex);
}
}

Expand Down Expand Up @@ -1435,7 +1435,7 @@ public Collection<ResourceAttribute<?>> addObject(PrismObject<? extends ShadowTy
} else if (midpointEx instanceof Error) {
throw (Error) midpointEx;
} else {
throw new SystemException("Got unexpected exception: " + ex.getClass().getName(), ex);
throw new SystemException("Got unexpected exception: " + ex.getClass().getName() + ": " + ex.getMessage(), ex);
}
}

Expand Down Expand Up @@ -1738,7 +1738,7 @@ public Set<PropertyModificationOperation> modifyObject(ObjectClassComplexTypeDef
} else if (midpointEx instanceof Error){
throw (Error) midpointEx;
}else{
throw new SystemException("Got unexpected exception: " + ex.getClass().getName(), ex);
throw new SystemException("Got unexpected exception: " + ex.getClass().getName() + ": " + ex.getMessage(), ex);
}
}

Expand Down Expand Up @@ -1816,7 +1816,7 @@ public Set<PropertyModificationOperation> modifyObject(ObjectClassComplexTypeDef
} else if (midpointEx instanceof Error) {
throw (Error) midpointEx;
} else {
throw new SystemException("Got unexpected exception: " + ex.getClass().getName(), ex);
throw new SystemException("Got unexpected exception: " + ex.getClass().getName() + ": " + ex.getMessage(), ex);
}
}
}
Expand Down Expand Up @@ -1871,7 +1871,7 @@ public Set<PropertyModificationOperation> modifyObject(ObjectClassComplexTypeDef
} else if (midpointEx instanceof Error) {
throw (Error) midpointEx;
} else {
throw new SystemException("Got unexpected exception: " + ex.getClass().getName(), ex);
throw new SystemException("Got unexpected exception: " + ex.getClass().getName() + ": " + ex.getMessage(), ex);
}
}
checkAndExecuteAdditionalOperation(reporter, additionalOperations, BeforeAfterType.AFTER, result);
Expand Down Expand Up @@ -1973,7 +1973,7 @@ public void deleteObject(ObjectClassComplexTypeDefinition objectClass, Collectio
} else if (midpointEx instanceof Error) {
throw (Error) midpointEx;
} else {
throw new SystemException("Got unexpected exception: " + ex.getClass().getName(), ex);
throw new SystemException("Got unexpected exception: " + ex.getClass().getName() + ": " + ex.getMessage(), ex);
}
}

Expand Down Expand Up @@ -2029,7 +2029,7 @@ public <T> PrismProperty<T> fetchCurrentToken(ObjectClassComplexTypeDefinition o
} else if (midpointEx instanceof Error) {
throw (Error) midpointEx;
} else {
throw new SystemException("Got unexpected exception: " + ex.getClass().getName(), ex);
throw new SystemException("Got unexpected exception: " + ex.getClass().getName() + ": " + ex.getMessage(), ex);
}
}

Expand Down Expand Up @@ -2118,7 +2118,7 @@ public boolean handle(SyncDelta delta) {
} else if (midpointEx instanceof Error) {
throw (Error) midpointEx;
} else {
throw new SystemException("Got unexpected exception: " + ex.getClass().getName(), ex);
throw new SystemException("Got unexpected exception: " + ex.getClass().getName() + ": " + ex.getMessage(), ex);
}
}
// convert changes from icf to midpoint Change
Expand Down Expand Up @@ -2335,7 +2335,7 @@ private void recordResume() {
} else if (midpointEx instanceof Error) {
throw (Error) midpointEx;
} else {
throw new SystemException("Got unexpected exception: " + ex.getClass().getName() + ": "+ex.getMessage(), ex);
throw new SystemException("Got unexpected exception: " + ex.getClass().getName() + ": " + ex.getMessage(), ex);
}
}

Expand Down Expand Up @@ -2459,7 +2459,7 @@ public boolean handle(ConnectorObject connectorObject) {
} else if (midpointEx instanceof Error) {
throw (Error) midpointEx;
} else {
throw new SystemException("Got unexpected exception: " + ex.getClass().getName(), ex);
throw new SystemException("Got unexpected exception: " + ex.getClass().getName() + ": " + ex.getMessage(), ex);
}
}

Expand Down Expand Up @@ -2891,7 +2891,7 @@ private Object executeScriptIcf(StateReporter reporter, ExecuteProvisioningScrip
} else if (midpointEx instanceof Error) {
throw (Error) midpointEx;
} else {
throw new SystemException("Got unexpected exception: " + ex.getClass().getName(), ex);
throw new SystemException("Got unexpected exception: " + ex.getClass().getName() + ": " + ex.getMessage(), ex);
}
}

Expand Down

0 comments on commit 469df2b

Please sign in to comment.