Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2179

Have o.a.t.g.driver.ser.SerializationException extend IOException

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.3.5
    • Fix Version/s: 3.3.7, 3.4.2
    • Component/s: io
    • Labels:
      None

      Description

      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 SerializationException extended IOException we could do something like:

            try {
              GraphBinaryWriter.write(object, bytebuf);
            } catch (IOException e) {
              throw new UncheckedIOException("Could not serialize", e)
            }
      

      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.

        Attachments

          Activity

            People

            • Assignee:
              spmallette Stephen Mallette
              Reporter:
              newkek Kevin Gallardo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: