summaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-10-09 17:00:24 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-10-09 17:00:24 +0200
commitf2431fb8c368925a271038bf8b9888146ae90a29 (patch)
tree6f73dd3966cd7ef7823ad22be2d1ab955d5abd56 /src/main/java/org
parentc634673bbf70f92a40abf29740664945981015f8 (diff)
Log requestAction exception reasons before throwing back to the client.
Don't log stack trace.
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/cristalise/kernel/entity/ItemImplementation.java17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/main/java/org/cristalise/kernel/entity/ItemImplementation.java b/src/main/java/org/cristalise/kernel/entity/ItemImplementation.java
index ccc2706..e543625 100644
--- a/src/main/java/org/cristalise/kernel/entity/ItemImplementation.java
+++ b/src/main/java/org/cristalise/kernel/entity/ItemImplementation.java
@@ -32,7 +32,6 @@ import org.cristalise.kernel.common.ObjectAlreadyExistsException;
import org.cristalise.kernel.common.ObjectNotFoundException;
import org.cristalise.kernel.common.PersistencyException;
import org.cristalise.kernel.common.SystemKey;
-import org.cristalise.kernel.entity.ItemOperations;
import org.cristalise.kernel.entity.agent.JobArrayList;
import org.cristalise.kernel.events.Event;
import org.cristalise.kernel.events.History;
@@ -200,29 +199,25 @@ public class ItemImplementation implements ItemOperations {
return finalOutcome;
// Normal operation exceptions
} catch (AccessRightsException ex) {
- Logger.msg("Propagating AccessRightsException back to the calling agent");
+ Logger.msg("Propagating AccessRightsException back to the calling agent: "+ex.getMessage());
throw ex;
} catch (InvalidTransitionException ex) {
- Logger.msg("Propagating InvalidTransitionException back to the calling agent");
+ Logger.msg("Propagating InvalidTransitionException back to the calling agent: "+ex.getMessage());
throw ex;
} catch (ObjectNotFoundException ex) {
- Logger.msg("Propagating ObjectNotFoundException back to the calling agent");
+ Logger.msg("Propagating ObjectNotFoundException back to the calling agent: "+ex.getMessage());
throw ex;
// errors
} catch (InvalidItemPathException ex) {
- Logger.error(ex);
throw new AccessRightsException("Invalid Agent Id: " + agentId);
} catch (InvalidDataException ex) {
- Logger.error(ex);
- Logger.msg("Propagating InvalidDataException back to the calling agent");
+ Logger.msg("Propagating InvalidDataException back to the calling agent: "+ex.getMessage());
throw ex;
} catch (ObjectAlreadyExistsException ex) {
- Logger.error(ex);
- Logger.msg("Propagating ObjectAlreadyExistsException back to the calling agent");
+ Logger.msg("Propagating ObjectAlreadyExistsException back to the calling agent: "+ex.getMessage());
throw ex;
} catch (InvalidCollectionModification ex) {
- Logger.error(ex);
- Logger.msg("Propagating InvalidCollectionModification back to the calling agent");
+ Logger.msg("Propagating InvalidCollectionModification back to the calling agent: "+ex.getMessage());
throw ex;
} catch (Throwable ex) { // non-CORBA exception hasn't been caught!
Logger.error("Unknown Error: requestAction on " + mItemPath