szetszwo commented on code in PR #6651:
URL: https://github.com/apache/ozone/pull/6651#discussion_r1595567447
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/admin/scm/ResetDeletedBlockRetryCountSubcommand.java:
##########
@@ -92,9 +90,12 @@ public void execute(ScmClient client) throws IOException {
System.out.println("The last loaded txID: " +
txIDs.get(txIDs.size() - 1));
}
- } catch (JsonIOException | JsonSyntaxException | IOException ex) {
- System.out.println("Cannot parse the file " + group.fileName);
+ } catch (JsonProcessingException ex) {
+ System.out.println("Error parsing JSON: " + ex.getMessage());
throw new IOException(ex);
+ } catch (IOException ex) {
+ System.out.println("Error reading file: " + ex.getMessage());
+ throw ex;
Review Comment:
Keep ` group.fileName` in the message. It will be very useful.
```java
} catch (JsonProcessingException | IOException ex) {
final String message = "Failed to parse the file " + group.fileName;
System.out.println(message);
throw new IOException(message, ex);
}
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]