Package com.aim2be.platform.schema
Class WireFormatException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.aim2be.platform.schema.WireFormatException
- All Implemented Interfaces:
Serializable
Thrown by
WireFormatCodec when on-wire bytes do not satisfy the
declared WireFormat (e.g. byte array shorter than the required
prefix length, or Confluent magic byte != 0x00).
Unchecked because the wire-format violations originate from network /
Kafka broker data plane, where the surrounding consumer loop already needs
a generic exception handler — making this a checked exception would force
callers to write try/catch blocks they cannot recover from in any
useful way. See rule 2 (error-handling) — propagate to the level that can
meaningfully handle the failure, which in this case is the Kafka consumer
loop's error handler.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionWireFormatException(String message) WireFormatException(String message, Throwable cause) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
WireFormatException
- Parameters:
message- human-readable description of the format violation
-
WireFormatException
- Parameters:
message- human-readable description of the format violationcause- the wrapped lower-level cause (e.g. a JVMIndexOutOfBoundsExceptionfrom a manual byte slice that races a malformed input)
-