You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "stephen mallette (JIRA)" <ji...@apache.org> on 2019/03/18 15:40:00 UTC

[jira] [Updated] (TINKERPOP-2179) Have o.a.t.g.driver.ser.SerializationException extend IOException

     [ https://issues.apache.org/jira/browse/TINKERPOP-2179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stephen mallette updated TINKERPOP-2179:
----------------------------------------
    Affects Version/s: 3.3.5
          Component/s: io

> Have o.a.t.g.driver.ser.SerializationException extend IOException
> -----------------------------------------------------------------
>
>                 Key: TINKERPOP-2179
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2179
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: io
>    Affects Versions: 3.3.5
>            Reporter: Kevin Gallardo
>            Priority: Major
>
> Suggestion to have the SerializationException from gremlin extend Java's IOException. Some other libraries like Jackson do it. 
> In Java 8 there is a new {{UncheckedIOException()}} that can be created and thrown at runtime, except it requires the underlying exception to be an IOException.
> Ideally if we SerializationException extended IOException we could do something like:
> {code:java}
>       try {
>         GraphBinaryWriter.write(object, bytebuf);
>       } catch (IOException e) {
>         throw new UncheckedIOException("Could not serialize", e)
>       }
> {code}
> So that the calling code does not throw a checked exception anymore. Also being able to catch IOException there would allow to be more generic.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)