Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2016-01-19 16:33:00 -0500
committerDonald Dunne2016-01-21 10:12:38 -0500
commit1b857215763906febddc8bb0975e27f99fb2a5d7 (patch)
tree01e04f6b0850a93b0a7d2ce8660ece804dbeac7c
parentbce62e50dc6d1a82d0f42ad3a1b14306662f07be (diff)
downloadorg.eclipse.osee-1b857215763906febddc8bb0975e27f99fb2a5d7.tar.gz
org.eclipse.osee-1b857215763906febddc8bb0975e27f99fb2a5d7.tar.xz
org.eclipse.osee-1b857215763906febddc8bb0975e27f99fb2a5d7.zip
refinement: Improve error text in StateManager
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManager.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManager.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManager.java
index b8d476c080..12eee64a4f 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManager.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManager.java
@@ -84,9 +84,8 @@ public class StateManager implements IAtsStateManager {
@Override
public StateType getCurrentStateType() {
- StateType type =
- StateType.valueOf(services.getAttributeResolver().getSoleAttributeValue(workItem,
- AtsAttributeTypes.CurrentStateType, "Working"));
+ StateType type = StateType.valueOf(services.getAttributeResolver().getSoleAttributeValue(workItem,
+ AtsAttributeTypes.CurrentStateType, "Working"));
return type;
}
@@ -361,7 +360,7 @@ public class StateManager implements IAtsStateManager {
if (state != null) {
return state.getAssignees();
} else {
- throw new OseeStateException("State [%s] not found", getCurrentStateName());
+ throw new OseeStateException("State [%s] not found for %s", getCurrentStateName(), workItem.toStringWithId());
}
}
@@ -402,7 +401,7 @@ public class StateManager implements IAtsStateManager {
state.setPercentComplete(percentComplete);
setDirty(true);
} else {
- throw new OseeStateException("State [%s] not found", stateName);
+ throw new OseeStateException("State [%s] not found for %s", stateName, workItem.toStringWithId());
}
}
@@ -413,7 +412,7 @@ public class StateManager implements IAtsStateManager {
state.setHoursSpent(hoursSpent);
setDirty(true);
} else {
- throw new OseeStateException("State [%s] not found", stateName);
+ throw new OseeStateException("State [%s] not found for %s", stateName, workItem.toStringWithId());
}
}
@@ -451,7 +450,7 @@ public class StateManager implements IAtsStateManager {
state.removeAssignee(assignee);
setDirty(true);
} else {
- throw new OseeStateException("State [%s] not found", stateName);
+ throw new OseeStateException("State [%s] not found for %s", stateName, workItem.toStringWithId());
}
}
@@ -575,7 +574,7 @@ public class StateManager implements IAtsStateManager {
public void validateNoBootstrapUser() throws OseeCoreException {
for (IAtsUser user : getAssignees()) {
if (SystemUser.BootStrap.getUserId().equals(user.getUserId())) {
- throw new OseeStateException("Assignee can't be bootstrap user");
+ throw new OseeStateException("Assignee can't be bootstrap user for %s", workItem.toStringWithId());
}
}
}

Back to the top