- org.simantics.db.Database.Session.ResourceSegment t = impl.getResourceSegment(clusterUID.asBytes(), resourceIndex, offset, size);
- return new ResourceSegment(t.getValueSize(), t.getSegment());
-
+ try {
+ org.simantics.db.Database.Session.ResourceSegment t = impl.getResourceSegment(clusterUID.asBytes(), resourceIndex, offset, size);
+ return new ResourceSegment(t.getValueSize(), t.getSegment());
+ } catch (AcornAccessVerificationException | IllegalAcornStateException e) {
+ throw new DatabaseException(e);
+ }