Added guard to avoid to lose data in case of problems
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-aggregator-se-plugin@154623 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f01c2b819c
commit
f954b7ff03
|
@ -64,6 +64,12 @@ public abstract class DocumentElaboration {
|
|||
int elaboratedPercentage = elaborated*100/rowToBeElaborated;
|
||||
logger.info("{} - Elaborated {} rows of {} (about {}%)", aggregationStatus.getAggregationInfo(), elaborated, rowToBeElaborated, elaboratedPercentage);
|
||||
}
|
||||
if(elaborated>rowToBeElaborated){
|
||||
br.close();
|
||||
in.close();
|
||||
fstream.close();
|
||||
throw new Exception("File line " + elaborated + " > " + rowToBeElaborated + ". This is really starnge and should not occur. Stopping execution");
|
||||
}
|
||||
}
|
||||
logger.info("{} - Elaborated {} rows of {} ({}%)", aggregationStatus.getAggregationInfo(), elaborated, rowToBeElaborated, 100);
|
||||
|
||||
|
|
Loading…
Reference in New Issue