]
Alexey Loubyansky resolved WFLY-3101.
-------------------------------------
Resolution: Done
Merged.
CLI: hide stacktraces for exceptions w/o messages when logging
errors
---------------------------------------------------------------------
Key: WFLY-3101
URL:
https://issues.jboss.org/browse/WFLY-3101
Project: WildFly
Issue Type: Task
Security Level: Public(Everyone can see)
Components: CLI
Affects Versions: 8.0.0.Final
Reporter: Alexey Loubyansky
Assignee: Alexey Loubyansky
Fix For: 8.0.1.Final
CommandContextImpl contains the following logic
public void handleSafe(String line) {
exitCode = 0;
try {
handle(line);
} catch(Throwable t) {
final StringBuilder buf = new StringBuilder();
buf.append(t.getLocalizedMessage());
Throwable t1 = t.getCause();
while(t1 != null) {
if(t1.getLocalizedMessage() != null) {
buf.append(": ").append(t1.getLocalizedMessage());
} else {
t1.printStackTrace();
}
t1 = t1.getCause();
}
error(buf.toString());
}
}
When an exception does not contain any message, e.g. in some cases
IllegalArgumentException, etc, the full stacktraces are logged that are useful for
debugging but not nice from the user interface point of view. It was suggested to hide
them.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: