This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/2.1 by this push:
     new 6829e02d7f Updated IllegalArguementException message (#3952)
6829e02d7f is described below

commit 6829e02d7f10c1a03a695d0c0a389d6791ffafc1
Author: rsingh433 <74160026+rsingh...@users.noreply.github.com>
AuthorDate: Tue Nov 21 13:31:57 2023 -0500

    Updated IllegalArguementException message (#3952)
    
    Updated the IllegalArguementException message for ScanCommand
    and GrepCommand so that the error message isn't incorrectly
    saying that the showfew option's arg must be greater than one,
    when that's not what the check is. The actual error should come
    from the exception, so this just adds a generic message to give
    context.
    
    Co-authored-by: Christopher Tubbs <ctubb...@apache.org>
---
 shell/src/main/java/org/apache/accumulo/shell/commands/GrepCommand.java | 2 +-
 shell/src/main/java/org/apache/accumulo/shell/commands/ScanCommand.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/shell/src/main/java/org/apache/accumulo/shell/commands/GrepCommand.java 
b/shell/src/main/java/org/apache/accumulo/shell/commands/GrepCommand.java
index 90c4a6fb44..f4b715fdd8 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/GrepCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/GrepCommand.java
@@ -60,7 +60,7 @@ public class GrepCommand extends ScanCommand {
         } catch (NumberFormatException nfe) {
           Shell.log.error("Arg must be an integer.", nfe);
         } catch (IllegalArgumentException iae) {
-          Shell.log.error("Arg must be greater than one.", iae);
+          Shell.log.error("Invalid length argument", iae);
         }
       }
       final Class<? extends Formatter> formatter = getFormatter(cl, tableName, 
shellState);
diff --git 
a/shell/src/main/java/org/apache/accumulo/shell/commands/ScanCommand.java 
b/shell/src/main/java/org/apache/accumulo/shell/commands/ScanCommand.java
index 12ccc94350..d9bc9f7d90 100644
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/ScanCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/ScanCommand.java
@@ -152,7 +152,7 @@ public class ScanCommand extends Command {
         } catch (NumberFormatException nfe) {
           Shell.log.error("Arg must be an integer.", nfe);
         } catch (IllegalArgumentException iae) {
-          Shell.log.error("Arg must be greater than one.", iae);
+          Shell.log.error("Invalid length argument", iae);
         }
       }
       printRecords(cl, shellState, config, scanner, formatter, printFile);

Reply via email to