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

com.trimble.id.SDKClientException Maven / Gradle / Ivy

Go to download

Trimble Identity OAuth Client library holds the client classes that are used for communicating with Trimble Identity Service

The newest version!
package com.trimble.id;

import java.util.concurrent.CompletionException;

public class SDKClientException extends CompletionException {

	private final String error;
	private final Exception exception;

	private static final long serialVersionUID = -4274121610563036338L;

	public SDKClientException(Exception ex) {
		super(ex);
		this.exception = ex;
		this.error = null;
	}

	public SDKClientException(String message) {
		super(message);
		this.error = null;
		this.exception = null;
	}

	public SDKClientException(String error, String message) {
		super(message);
		this.error = error;
		this.exception = null;
	}

	public SDKClientException(Exception ex, Throwable cause, String msg) {
		super(msg, cause);
		this.exception = ex;
		this.error = null;
	}

	public SDKClientException(Throwable cause, String msg) {
		super(msg, cause);
		this.exception = null;
		this.error = null;
	}

	/**
	 * Get the error message
	 * 
	 * @return The error message
	 */
	public String getError() {
		return error;
	}

	/**
	 * Get the exception
	 * 
	 * @return The exception
	 */
	public Exception getException() {
		return exception;
	}

	@Override
	public String toString() {
		String message = getMessage();
		return  "SDKClientException(" +
				(message != null ? "message=" + message : "") +
				(error != null ? ",error=" + error : "") + ")";
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy