Skip to content

Custom exception for Buffer Underflow (like BufferUnderflowKryoException) #872

@msx80

Description

@msx80

So i'm implementing some kind of persistency system, and i'd like to be able to differentiate between Buffer Underflows from other kind of exceptions, which are treated differently.

If possible it would be awesome if those exception could be differentiated, perhaps with a subclass of KryoException like BufferUnderflowKryoException, so they can be catched separatedly.

Currently i'm checking the message of the exception (if(e.getMessage().contains("Buffer underflow")) but it's far from ideal.
As an alternative an error code could be added, but i think it's more work and less idiomatic.

If needed i could try and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions