Skip to content

Commit

Permalink
loglevel of FileSizeException to info; only public profiles on
Browse files Browse the repository at this point in the history
status=production
  • Loading branch information
WolfgangWalter Sauer (wowasa) committed Mar 8, 2019
1 parent 5714155 commit 9f4dfd2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static Collection<ProfileHeader> createPublicProfiles(){
XMLMarshaller<PublicProfiles> publicProfilesMarshaller = new XMLMarshaller<>(PublicProfiles.class);
Collection<ProfileHeader> publicProfiles = publicProfilesMarshaller
//.unmarshal(new URL(CRService.CR_REST_1_2_PROFILES).openStream())
.unmarshal(new URL(Configuration.VLO_CONFIG.getComponentRegistryRESTURL() + "?registrySpace=published&status=*").openStream())
.unmarshal(new URL(Configuration.VLO_CONFIG.getComponentRegistryRESTURL() + "?registrySpace=published&status=production").openStream())
.profileDescription;

publicProfiles.forEach(p -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,18 @@ public Report<?> process(CurationEntity entity, String parentName) {

report.addSegmentScore(step.calculateScore(report));

} catch (FileSizeException | ExecutionException | IOException | VTDException | TransformerException | SAXException | ParserConfigurationException | ProfileNotFoundException e) {
}
catch(FileSizeException e) {
_logger.info("Exception when processing " + step.toString() + " : " + e.getMessage());
//if it is not a collection report, keep the loop going for the following records, dont just produce an error report
if (!(report instanceof CollectionReport)) {
return new ErrorReport(report.getName(), e.getMessage());
} else {
addInvalidFile(report, e);
}
}

catch (ExecutionException | IOException | VTDException | TransformerException | SAXException | ParserConfigurationException | ProfileNotFoundException e) {
_logger.error("Exception when processing " + step.toString() + " : " + e.getMessage());
//if it is not a collection report, keep the loop going for the following records, dont just produce an error report
if (!(report instanceof CollectionReport)) {
Expand Down

0 comments on commit 9f4dfd2

Please sign in to comment.