Example usage for com.fasterxml.jackson.databind RuntimeJsonMappingException toString

List of usage examples for com.fasterxml.jackson.databind RuntimeJsonMappingException toString

Introduction

In this page you can find the example usage for com.fasterxml.jackson.databind RuntimeJsonMappingException toString.

Prototype

public String toString() 

Source Link

Document

Returns a short description of this throwable.

Usage

From source file:com.streamsets.pipeline.lib.json.StreamingJsonParser.java

public Object read() throws IOException {
    if (closed) {
        throw new IOException("The parser is closed");
    }// w ww .  ja v  a  2s .com
    try {
        Object value = null;
        switch (mode) {
        case ARRAY_OBJECTS:
            value = readObjectFromArray();
            break;
        case MULTIPLE_OBJECTS:
            value = readObjectFromStream();
            break;
        }
        return value;
    } catch (RuntimeJsonMappingException ex) {
        throw new JsonParseException(ex.toString(), jsonParser.getTokenLocation(), ex);
    }
}

From source file:com.streamsets.datacollector.json.JsonObjectReaderImpl.java

@Override
public Object read() throws IOException {
    if (closed) {
        throw new IOException("The parser is closed");
    }//from   ww w . j  av a 2  s  . com
    try {
        Object value = null;
        switch (mode) {
        case ARRAY_OBJECTS:
            value = readObjectFromArray();
            break;
        case MULTIPLE_OBJECTS:
            value = readObjectFromStream();
            break;
        }
        return value;
    } catch (RuntimeJsonMappingException ex) {
        throw new JsonParseException(ex.toString(), jsonParser.getTokenLocation(), ex);
    }
}