From 401b9e8f1a9b9ba86601b88f926f1882a01cda91 Mon Sep 17 00:00:00 2001 From: Randeep Singh Date: Tue, 14 Nov 2023 11:34:35 -0500 Subject: [PATCH] Updated the IllegalArguementException message. --- .../java/org/apache/accumulo/shell/commands/GrepCommand.java | 2 +- .../java/org/apache/accumulo/shell/commands/ScanCommand.java | 3 ++- 2 files changed, 3 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 90c4a6fb442..17523c77961 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 int execute(final String fullCommand, final CommandLine cl, final Shell s } 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("{}", iae.getMessage(), iae); } } final Class 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 12ccc94350b..8ca15cd691f 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,8 @@ public int execute(final String fullCommand, final CommandLine cl, final Shell s } 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("{}", iae.getMessage(), iae); + } } printRecords(cl, shellState, config, scanner, formatter, printFile);