adoroszlai commented on code in PR #7829:
URL: https://github.com/apache/ozone/pull/7829#discussion_r1946309156


##########
hadoop-ozone/cli-shell/src/main/java/org/apache/hadoop/ozone/shell/keys/PutKeyHandler.java:
##########
@@ -81,6 +81,9 @@ protected void execute(OzoneClient client, OzoneAddress 
address)
     String keyName = address.getKeyName();
 
     File dataFile = new File(fileName);
+    if (!dataFile.exists()) {
+      throw new IOException("Error: File not found: " + fileName);

Review Comment:
   I guess `FileNotFoundException` would be better, but it doesn't really 
matter, because it is not caught specifically, and only the message is shown to 
the user.



-- 
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]

Reply via email to