Skip to content

Commit

Permalink
P4PADEV-1657 code review
Browse files Browse the repository at this point in the history
  • Loading branch information
domenicogi committed Dec 20, 2024
1 parent 049199f commit 8fb8ae5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import it.gov.pagopa.payhub.activities.enums.IngestionFlowFileType;
import it.gov.pagopa.payhub.activities.exception.IngestionFlowFileNotFoundException;

import it.gov.pagopa.payhub.activities.exception.TreasuryOpiInvalidFileException;
import it.gov.pagopa.payhub.activities.service.ingestionflow.IngestionFlowFileRetrieverService;

import it.gov.pagopa.payhub.activities.service.treasury.TreasuryUnmarshallerService;
Expand All @@ -17,7 +18,6 @@
import java.io.IOException;
import java.nio.file.Path;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;

/**
* Interface for the TreasuryOpiIngestionActivity.
Expand Down Expand Up @@ -96,8 +96,8 @@ private List<String> parseData(Path ingestionFlowFilePath) {
try {
flussoGiornaleDiCassa14 = treasuryUnmarshallerService.unmarshalOpi14(ingestionFlowFile);
log.debug("file flussoGiornaleDiCassa with Id {} parsed successfully ", flussoGiornaleDiCassa14.getId());
} catch (Exception e) {
log.info("file flussoGiornaleDiCassa parsing error with opi 1.4 format {} ", e.getMessage());
} catch (Exception exception) {
log.info("file flussoGiornaleDiCassa parsing error with opi 1.4 format {} ", exception.getMessage());
throw new TreasuryOpiInvalidFileException("Cannot parse treasury Opi file " + ingestionFlowFile);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package it.gov.pagopa.payhub.activities.exception;

public class TreasuryOpiInvalidFileException extends ActivitiesException {
public TreasuryOpiInvalidFileException(String message) {
super(message);
}
}

0 comments on commit 8fb8ae5

Please sign in to comment.