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

nl.topicus.jdbc.xa.CloudSpannerXAException Maven / Gradle / Ivy

There is a newer version: 1.1.6
Show newest version
package nl.topicus.jdbc.xa;

import javax.transaction.xa.XAException;

import nl.topicus.jdbc.shaded.com.google.rpc.Code;

import nl.topicus.jdbc.exception.CloudSpannerSQLException;

public class CloudSpannerXAException extends XAException
{
	private static final long serialVersionUID = 1L;

	private final Code code;

	public CloudSpannerXAException(String message, Code code, int errorCode)
	{
		super(message);
		this.errorCode = errorCode;
		this.code = code;
	}

	public CloudSpannerXAException(String message, Throwable cause, Code code, int errorCode)
	{
		super(message);
		initCause(cause);
		this.errorCode = errorCode;
		this.code = code;
	}

	public CloudSpannerXAException(String message, CloudSpannerSQLException cause, int errorCode)
	{
		super(message);
		initCause(cause);
		this.errorCode = errorCode;
		this.code = cause.getCode();
	}

	public Code getCode()
	{
		return code;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy