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

com.j256.ormlite.misc.SqlExceptionUtil Maven / Gradle / Ivy

Go to download

Lightweight Object Relational Model (ORM) for persisting objects to SQL databases.

There is a newer version: 6.1
Show newest version
package com.j256.ormlite.misc;

import java.sql.SQLException;

/**
 * Utility class to help with SQLException throwing.
 * 
 * @author graywatson
 */
public class SqlExceptionUtil {

	/**
	 * Should be used in a static context only.
	 */
	private SqlExceptionUtil() {
	}

	/**
	 * Convenience method to allow a cause. Grrrr.
	 */
	public static SQLException create(String message, Throwable cause) {
		SQLException sqlException = new SQLException(message);
		sqlException.initCause(cause);
		return sqlException;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy