All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.findwise.hydra.JsonException Maven / Gradle / Ivy

There is a newer version: 0.5.0
Show newest version
package com.findwise.hydra;

import com.google.gson.JsonParseException;

/**
 * Class for encapsulating a JsonParseException in a non-runtime exception.
 * 
 * @author joel.westberg
 */
public final class JsonException extends Exception {
	private static final long serialVersionUID = -3556367227200786526L;
	
	public JsonException(JsonParseException t) {
		super(t);
	}
	
	public String getMessage() {
		Throwable t = getCause();
		while(t.getCause()!=null) {
			t = t.getCause();
		}
		return t.getMessage();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy