Skip to content

Commit

Permalink
Improved logging
Browse files Browse the repository at this point in the history
  • Loading branch information
cube committed Feb 26, 2024
1 parent 914ee7b commit e1d6e78
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/main/java/com/chaudhuri/cataloggenerator/Generator.java
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,17 @@ List<ExpansionManifest> parseUrls(List<String> urls) throws Exception {
.parallel()
.filter(url -> !url.startsWith("#"))
.filter(url -> !url.isBlank())
.map(e -> {
ExpansionManifest em = getManifestFromUrl(e);
log.info("Parsed {}, found {}", e, em.getIdentifier());

if (em.getIdentifier() == null || em.getIdentifier().isBlank()) {
log.error("Invalid identifier in expansion {}", e);
.map(url -> {
ExpansionManifest em = getManifestFromUrl(url);
if (em == null) {
log.error("Could not parse expansion at {}", url);
} else if (em.getIdentifier() == null || em.getIdentifier().isBlank()) {
log.error("Invalid identifier in expansion {}", url);
} else {
log.debug("Parsed {}, found {}", url, em.getIdentifier());
}


return em;
})
.filter(m -> m != null)
Expand Down

0 comments on commit e1d6e78

Please sign in to comment.