Skip to content

Commit

Permalink
Improve exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mhrimaz committed Oct 4, 2023
1 parent bea93ab commit 692b183
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,9 @@ public Submodel getSubmodelByIdMetadata(String submodelId) {
submodelDeepCopy.setSubmodelElements(null);
return submodelDeepCopy;
} catch (DeserializationException e) {
e.printStackTrace();
throw new RuntimeException("Unable to deserialize the Submodel");
throw new RuntimeException("Unable to deserialize the Submodel", e);
} catch (SerializationException e) {
e.printStackTrace();
throw new RuntimeException("Unable to serialize the Submodel");
throw new RuntimeException("Unable to serialize the Submodel", e);
}
}

Expand Down

0 comments on commit 692b183

Please sign in to comment.