Skip to content

Commit

Permalink
Merge pull request #25355 from dmatej/stacktraces
Browse files Browse the repository at this point in the history
AdminMain - don't drop causes from logs
  • Loading branch information
arjantijms authored Jan 31, 2025
2 parents 4e2ef0f + b3235c3 commit 3498ee1
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, 2024 Contributors to the Eclipse Foundation
* Copyright (c) 2022, 2025 Contributors to the Eclipse Foundation
* Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -321,7 +321,7 @@ public int executeCommand(String[] argv) {
cmd = CLICommand.getCommand(cliContainer, command);
return cmd.execute(argv);
} catch (CommandValidationException cve) {
logger.severe(cve.getMessage());
logger.log(SEVERE, cve.getMessage(), cve);
if (cmd == null) // error parsing program options
{
printUsage();
Expand All @@ -331,7 +331,7 @@ public int executeCommand(String[] argv) {
return ERROR;
} catch (InvalidCommandException ice) {
// find closest match with local or remote commands
logger.severe(ice.getMessage());
logger.log(SEVERE, ice.getMessage(), ice);
try {
po.setEcho(false);
CLIUtil.displayClosestMatch(command,
Expand All @@ -344,7 +344,7 @@ public int executeCommand(String[] argv) {
} catch (CommandException ce) {
if (ce.getCause() instanceof ConnectException) {
// find closest match with local commands
logger.severe(ce.getMessage());
logger.log(SEVERE, ce.getMessage(), ce);
try {
CLIUtil.displayClosestMatch(command,
CLIUtil.getLocalCommands(cliContainer),
Expand All @@ -353,7 +353,7 @@ public int executeCommand(String[] argv) {
logger.info(strings.get("InvalidRemoteCommand", command));
}
} else {
logger.severe(ce.getMessage());
logger.log(SEVERE, ce.getMessage(), ce);
}
return ERROR;
}
Expand Down

0 comments on commit 3498ee1

Please sign in to comment.