/*
 * (c) LibriCore
 * 
 * Created on Jul 2, 2004
 * 
 * DataAccessException.java
 */
package org.folio.cataloging.business.common;

import org.folio.cataloging.exception.ModCatalogingException;


/**
 * @author paulm
 * @version %I%, %G%
 * @since 1.0
 */
public class DataAccessException extends ModCatalogingException {

	/**
	 * @see ModCatalogingException#ModCatalogingException()
	 */
	public DataAccessException() {
		super();
	}

	/**
	 * @see ModCatalogingException#ModCatalogingException(String)
	 */
	public DataAccessException(String message) {
		super(message);
	}

	/**
	 * @see ModCatalogingException#ModCatalogingException(String, Throwable)
	 */
	public DataAccessException(String message, Throwable cause) {
		super(message, cause);
	}

	/**
	 * @see ModCatalogingException#ModCatalogingException(Throwable)
	 */
	public DataAccessException(Throwable cause) {
		super(cause);
	}

}

@@ -1,11 +1,10 @@
 /*
-%0D
 %0A * (c) 
@@ -12,22 +12,19 @@
 ibriCore
-%0D
 %0A *
- %0D
 %0A * Crea
@@ -45,14 +45,11 @@
 2004
-%0D
 %0A *
- %0D
 %0A * 
@@ -72,22 +72,20 @@
 ion.java
-%0D
 %0A */
-%0D
 %0Apackage
@@ -122,19 +122,81 @@
 .common;
-%0D%0A%0D
+%0A%0Aimport lombok.Data;%0Aimport lombok.Getter;%0Aimport lombok.Setter;
 %0Aimport 
@@ -253,18 +253,45 @@
 ion;
-%0D%0A%0D%0A%0D
+%0A%0Aimport java.sql.SQLException;%0A%0A
 %0A/**
-%0D
 %0A * 
@@ -303,17 +303,16 @@
 or paulm
-%0D
 %0A * @ver
@@ -324,17 +324,16 @@
 %25I%25, %25G%25
-%0D
 %0A * @sin
@@ -342,14 +342,28 @@
  1.0
-%0D
 %0A */
-%0D
+%0A@Getter%0A@Setter
 %0Apub
@@ -424,25 +424,71 @@
 eption %7B
-%0D%0A%0D
+%0A%0A%0A  public int errorCode;%0A  public String state;%0A
 %0A%09/**
-%0D
 %0A%09 * @se
@@ -536,23 +536,21 @@
 eption()
-%0D
 %0A%09 */
-%0D
 %0A%09public
@@ -573,17 +573,16 @@
 tion() %7B
-%0D
 %0A%09%09super
@@ -584,29 +584,25 @@
 super();
-%0D
 %0A%09%7D
-%0D%0A%0D
+%0A
 %0A%09/**
-%0D
 %0A%09 * @se
@@ -656,23 +656,21 @@
 (String)
-%0D
 %0A%09 */
-%0D
 %0A%09public
@@ -703,25 +703,24 @@
 g message) %7B
-%0D
 %0A%09%09super(mes
@@ -725,29 +725,25 @@
 essage);
-%0D
 %0A%09%7D
-%0D%0A%0D
+%0A
 %0A%09/**
-%0D
 %0A%09 * @se
@@ -800,39 +800,37 @@
 ring, Throwable)
-%0D
 %0A%09 */
-%0D
 %0A%09public DataAcc
@@ -868,33 +868,32 @@
 rowable cause) %7B
-%0D
 %0A%09%09super(message
@@ -905,21 +905,46 @@
 se);
-%0D%0A%09%7D%0D%0A%0D
+%0A    getCodeAndState(cause);%0A  %7D%0A
 %0A%09/**
-%0D
 %0A%09 *
@@ -1009,15 +1009,13 @@
 ble)
-%0D
 %0A%09 */
-%0D
 %0A%09pu
@@ -1057,17 +1057,16 @@
 cause) %7B
-%0D
 %0A%09%09super
@@ -1077,15 +1077,551 @@
 se);
-%0D
 %0A%09%7D
-%0D%0A%0D%0A%7D%0D
+%0A%0A%0A  private void getCodeAndState(Throwable cause) %7B%0A    if (cause instanceof SQLException) %7B%0A      errorCode = ((SQLException) cause).getErrorCode();%0A      state = ((SQLException) cause).getSQLState();%0A    %7D else %7B%0A      errorCode = -1;%0A      state = cause.getMessage();%0A    %7D%0A  %7D%0A%0A%0A  @Override%0A  public String toString() %7B%0A    return new StringBuilder(%0A      getClass().getName())%0A      .append('%5B')%0A      .append(errorCode)%0A      .append(',')%0A      .append(state).append(%22%5D: %22)%0A      .append(getLocalizedMessage())%0A      .toString();%0A  %7D%0A%0A%7D
 %0A

add some detail