Skip to content

Wrap SerializationException thrown on store internal method #75

@tuhuynh27

Description

@tuhuynh27

Currently we have code like this:

try {
            byte[] value = chronicleMap.get(key);
            LinkedList<BytesValue> 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions