Class SofabException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.sofabuffers.sofab.SofabException
- All Implemented Interfaces:
Serializable
Thrown by the encoder and decoder on protocol or buffer errors.
It extends IOException so it composes naturally with Java I/O: a
FlushSink that writes to a socket or file may itself throw
IOException, and generated serialize code can simply declare
throws IOException. The specific SofabError is available via
error().
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSofabException(SofabError error) Create an exception for the given error category.SofabException(SofabError error, String detail) Create an exception for the given error category with extra detail. -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SofabException
Create an exception for the given error category.- Parameters:
error- the error category
-
SofabException
Create an exception for the given error category with extra detail.- Parameters:
error- the error categorydetail- human-readable context appended to the message
-
-
Method Details
-
error
-