Wrap SerializationException thrown on store internal method
- Dominant language
- Java
- Stars
- 109
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
Currently we have code like this:
```java
try {
byte[] value = chronicleMap.get(key);
LinkedList list;
list = value == null ? new LinkedList<>() : SerializationUtils.deserialize(value); // <- can throw
for (byte[] v : values) {
list.addFirst(new BytesValue(v));
}
chronicleMap.put(key, SerializationUtils.serialize(list)); // <- can throw
return list.size();
} finally {
lock.unlock();
}
```
From 2 places the same exception can be thrown but only 1 of them indicates client error.
Should create `try/catch` and wrap the thrown exception.
Related to #74
Contributor guide
Research direction
Start by reading the store internal method containing the two SerializationUtils calls, then review related issue #74 for context. Trace both serialization failure paths and verify that the client-error path wraps SerializationException while the other path retains its intended behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- database
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100