Top Description Fields Constructors Methods
com.fasterxml.jackson.core.exc

public abstract Class StreamWriteException

extends JsonProcessingException
Class Inheritance
Known Direct Subclasses
com.fasterxml.jackson.core.JsonGenerationException
Imports
com.fasterxml.jackson.core.*

Intermediate base class for all read-side streaming processing problems, including parsing and input value coercion problems.

Added in 2.13 to eventually replace com.fasterxml.jackson.core.JsonGenerationException.

Since
2.13

Field Summary

Modifier and TypeField and Description
protected transient JsonGenerator
private static final long
Inherited from com.fasterxml.jackson.core.JsonProcessingException:
_location

Constructor Summary

AccessConstructor and Description
protected
protected
protected

Method Summary

Modifier and TypeMethod and Description
public JsonGenerator
getProcessor()

Overrides com.fasterxml.jackson.core.JsonProcessingException.getProcessor.

Method that allows accessing underlying processor that triggered this exception; typically either JsonParser or JsonGenerator for exceptions that originate from streaming API.
public abstract StreamWriteException

Returns:

This exception instance (to allow call chaining)
withGenerator
(JsonGenerator
Generator to assign
g
)

Fluent method that may be used to assign originating JsonGenerator, to be accessed using getProcessor().

Inherited from com.fasterxml.jackson.core.JsonProcessingException:
clearLocationgetLocationgetMessagegetMessageSuffixgetOriginalMessagetoString

Field Detail

_processorback to summary
protected transient JsonGenerator _processor
serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.core.JsonProcessingException.serialVersionUID.

Constructor Detail

StreamWriteExceptionback to summary
protected StreamWriteException(Throwable rootCause, JsonGenerator g)
StreamWriteExceptionback to summary
protected StreamWriteException(String msg, JsonGenerator g)
StreamWriteExceptionback to summary
protected StreamWriteException(String msg, Throwable rootCause, JsonGenerator g)

Method Detail

getProcessorback to summary
public JsonGenerator getProcessor()

Overrides com.fasterxml.jackson.core.JsonProcessingException.getProcessor.

Doc from com.fasterxml.jackson.core.JsonProcessingException.getProcessor.

Method that allows accessing underlying processor that triggered this exception; typically either JsonParser 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.

Returns:JsonGenerator

Originating processor, if available; null if not.

Annotations
@Override
withGeneratorback to summary
public abstract StreamWriteException withGenerator(JsonGenerator g)

Fluent method that may be used to assign originating JsonGenerator, to be accessed using getProcessor().

Parameters
g:JsonGenerator

Generator to assign

Returns:StreamWriteException

This exception instance (to allow call chaining)