summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2017-12-13 16:28:35 -0500
committerMegumi Telles2017-12-13 16:45:48 -0500
commitdaaf6bea6b1f7820d74ba14f03e5c850e5bcd4c9 (patch)
tree63c068af9506e8329052cc593cfbc06c86698acb
parent930e97d022d47821efc8c110a7078454385676c3 (diff)
downloadorg.eclipse.osee-daaf6bea6b1f7820d74ba14f03e5c850e5bcd4c9.zip
org.eclipse.osee-daaf6bea6b1f7820d74ba14f03e5c850e5bcd4c9.tar.gz
org.eclipse.osee-daaf6bea6b1f7820d74ba14f03e5c850e5bcd4c9.tar.xz
refinement: Improve SkynetTransaction error messages
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java
index e6bfc40..a4fb787 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java
@@ -259,8 +259,9 @@ public final class SkynetTransaction extends TransactionOperation<BranchId> {
private void checkMultiplicity(Artifact artifact, Attribute<?> attr) {
if (attr.getAttributeType().getMaxOccurrences() == 1 && artifact.getAttributeCount(attr.getAttributeType()) > 1) {
- throw new OseeStateException("Artifact [%s] can only have 1 [%s] attribute but has %d", artifact.getName(),
- attr.getAttributeType().getName(), artifact.getAttributeCount(attr.getAttributeType()));
+ throw new OseeStateException("Artifact %s can only have 1 [%s] attribute but has %d",
+ artifact.toStringWithId(), attr.getAttributeType().getName(),
+ artifact.getAttributeCount(attr.getAttributeType()));
}
}
@@ -273,7 +274,7 @@ public final class SkynetTransaction extends TransactionOperation<BranchId> {
if (limitToCheck == 1) {
int count = art.getRelatedArtifactsCount(RelationTypeSide.create(relationType, sideToCheck));
if (count > 1) {
- throw new OseeStateException("Artifact [%s] can only have 1 [%s] on [%s] but has %d", art.getName(),
+ throw new OseeStateException("Artifact %s can only have 1 [%s] on [%s] but has %d", art.toStringWithId(),
relationType.getSideName(sideToCheck), sideToCheck.name(), count);
}
}