public abstract class StreamWriteException extends JsonProcessingException
Added in 2.13 to eventually replace JsonGenerationException.
| Modifier and Type | Method and Description |
|---|---|
JsonGenerator |
getProcessor()
Method that allows accessing underlying processor that triggered
this exception; typically either
JsonParser or JsonGenerator
for exceptions that originate from streaming API. |
abstract StreamWriteException |
withGenerator(JsonGenerator g)
Fluent method that may be used to assign originating
JsonGenerator,
to be accessed using getProcessor(). |
clearLocation, getLocation, getMessage, getOriginalMessage, toStringpublic abstract StreamWriteException withGenerator(JsonGenerator g)
JsonGenerator,
to be accessed using getProcessor().g - Generator to assignpublic JsonGenerator getProcessor()
JsonProcessingExceptionJsonParser or JsonGenerator
for exceptions that originate from streaming API.
Note that it is possible that `null` may be returned if code throwing
exception either has no access to processor; or has not been retrofitted
to set it; this means that caller needs to take care to check for nulls.
Subtypes override this method with co-variant return type, for more
type-safe access.getProcessor in class JsonProcessingExceptionCopyright © 2010 - 2023 Adobe. All Rights Reserved