public QueryException(String message,int errorCode,SqlStates sqlState,Throwable cause){
  super(message,cause);
  this.message=message;
  this.errorCode=errorCode;
  this.sqlState=sqlState.getSqlState();
}

public QueryException ( String message , int errorCode , SqlStates sqlState , Throwable cause ) { super ( message , cause ) ; this . message = message ; this . errorCode = errorCode ; this . sqlState = sqlState . getSqlState ( ) ; }
creates a query exception with a message and a cause .
