Migliorato log errore in exchange fornitori
This commit is contained in:
@@ -9,6 +9,7 @@ import it.integry.ems.system.exchange.service.structure.ExchangeImportSchemaMana
|
|||||||
import it.integry.ems_model.base.EquatableEntityInterface;
|
import it.integry.ems_model.base.EquatableEntityInterface;
|
||||||
import it.integry.ems_model.entity.AtbForn;
|
import it.integry.ems_model.entity.AtbForn;
|
||||||
import it.integry.ems_model.entity.GtbAnag;
|
import it.integry.ems_model.entity.GtbAnag;
|
||||||
|
import it.integry.ems_model.exception.EntityException;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -74,10 +75,15 @@ public class ExchangeFornitoriImportService {
|
|||||||
internalMultiDb.commitAll();
|
internalMultiDb.commitAll();
|
||||||
exchangeMultiDb.commitAll();
|
exchangeMultiDb.commitAll();
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
if (firstExceptionToThrow[0] == null) firstExceptionToThrow[0] = ex;
|
|
||||||
|
|
||||||
logger.error("Errore durante l'importazione del fornitore", ex);
|
|
||||||
internalMultiDb.rollbackAll();
|
internalMultiDb.rollbackAll();
|
||||||
|
exchangeMultiDb.commitAll();
|
||||||
|
|
||||||
|
GtbAnag gtbAnagError = (GtbAnag) dataToSave;
|
||||||
|
Exception newException = new EntityException("Errore durante l'importazione del fornitore [" +
|
||||||
|
"cod_anag: " + gtbAnagError.getCodAnag() + "]", ex);
|
||||||
|
|
||||||
|
if (firstExceptionToThrow[0] == null) firstExceptionToThrow[0] = newException;
|
||||||
|
logger.error(newException);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user