mi da il seguente errore perchè?
"NotizieDBManager.java": Error #: 556 : exception it.evin.aggiornamenti.database.ErroreAccessoDatiEx ception is never thrown in the corresponding try block at line 99, column 2
cosa vuol dire questo errore e cosa dovrei fare per risolverlo?
***********************
public static Notizie trovaNotizia(int id) throws ErroreAccessoDatiException,SQLException{
if(dataSource == null){
throw new IllegalStateException("notizieDBManager non ha ancora a disposizione un DataSource valido");
}
String sqlQuery = "select * from notizie_generiche where id=?";
Connection connection = null;
PreparedStatement pStat = null;
ResultSet rSet = null;
try{
connection = dataSource.getConnection();
pStat = connection.prepareStatement(sqlQuery);
pStat.setInt(1,id);
rSet = pStat.executeQuery();
Notizie notizia=null;
if (rSet.next()){
Date tempo=rSet.getDate(2);
java.util.Date tmp=new java.util.Date(tempo.getTime());
notizia= new Notizie(rSet.getInt(1),tmp,rSet.getString(3),rSet. getString(4),rSet.getInt(5));
return notizia;
}
else {
return null;
}
}
***lina errata
catch(ErroreAccessoDatiException errore){
throw new ErroreAccessoDatiException(errore.getMessage(),Str ing.valueOf(errore.getErrorCode()));
}
*************
catch(SQLException errore){
throw new SQLException(errore.getMessage(),String.valueOf(er rore.getErrorCode()));
}
finally{
try{rSet.close();}catch(Exception e){}
try{pStat.close();}catch(Exception e){}
try{connection.close();}catch(Exception e){}
}
}
}