ottlinger commented on code in PR #576:
URL: https://github.com/apache/creadur-rat/pull/576#discussion_r2513937106


##########
apache-rat-core/src/main/java/org/apache/rat/Report.java:
##########
@@ -48,19 +49,23 @@ public static void main(final String[] args) throws 
Exception {
             System.exit(0);
         }
 
-        ReportConfiguration configuration = OptionCollection.parseCommands(new 
File("."), args, Report::printUsage);
-        if (configuration != null) {
-            configuration.validate(DefaultLog.getInstance()::error);
-            Reporter reporter = new Reporter(configuration);
-            reporter.output();
-            reporter.writeSummary(DefaultLog.getInstance().asWriter());
+        try {
+            ReportConfiguration configuration = 
OptionCollection.parseCommands(new File("."), args, Report::printUsage);
+            if (configuration != null) {
+                configuration.validate(DefaultLog.getInstance()::error);
+                Reporter reporter = new Reporter(configuration);
+                reporter.output();
+                reporter.writeSummary(DefaultLog.getInstance().asWriter());
 
-            if (configuration.getClaimValidator().hasErrors()) {
-                
configuration.getClaimValidator().logIssues(reporter.getClaimsStatistic());
-                throw new RatDocumentAnalysisException(format("Issues with %s",
-                        String.join(", ",
-                                
configuration.getClaimValidator().listIssues(reporter.getClaimsStatistic()))));
+                if (configuration.getClaimValidator().hasErrors()) {
+                    
configuration.getClaimValidator().logIssues(reporter.getClaimsStatistic());
+                    throw new RatDocumentAnalysisException(format("Issues with 
%s",
+                            String.join(", ",
+                                    
configuration.getClaimValidator().listIssues(reporter.getClaimsStatistic()))));
+                }
             }
+        } catch (ParseException e) {

Review Comment:
   Shouldn't we log something before exiting with status 1?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to