Skip to content

Commit

Permalink
log warn when not ObjectId is found
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega committed Oct 8, 2024
1 parent f9932ff commit 36dd84c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ public Integer getObjectId() throws ArcgisException {
}
}
if (objectId.equals(-1)) {
LOGGER.warn("Cant find " + GisAttributeType.OID + " in Feature Object.");
throw new ArcgisException("Cant find " + GisAttributeType.OID + " in Feature Object.");
} else {
return objectId;
Expand Down Expand Up @@ -305,7 +306,7 @@ public void setObjectId(Integer objectId) throws ArcgisException {
}
} catch (Exception e) {
throw new ArcgisException(
"Error setting OBJECTID for feature " + this.toString() + " - Error: " + e);
"Error setting OBJECTID for feature " + this.toString() + " with value " + objectId + " - Error: " + e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ protected void splitFeatureListIfExists(List<Feature> featureArray,
if (featureId.equalsIgnoreCase(serverFeatureId)) {
found = true;
Integer oid = serverFeature.getObjectId();
LOGGER.debug("retrieved ObjectId: " + oid + " from feature " + serverFeatureId);
feature.setObjectId(oid);
existentFeatures.add(feature);
}
Expand Down

0 comments on commit 36dd84c

Please sign in to comment.