[jboss-jira] [JBoss JIRA] (WFLY-3101) CLI: hide stacktraces for exceptions w/o messages when logging errors

RH Bugzilla Integration (JIRA) issues at jboss.org
Tue Sep 16 15:15:21 EDT 2014


    [ https://issues.jboss.org/browse/WFLY-3101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003163#comment-13003163 ] 

RH Bugzilla Integration commented on WFLY-3101:
-----------------------------------------------

Paul Gier <pgier at redhat.com> changed the Status of [bug 997584|https://bugzilla.redhat.com/show_bug.cgi?id=997584] from MODIFIED to ON_QA

> 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
>          Components: CLI
>    Affects Versions: 8.0.0.Final
>            Reporter: Alexey Loubyansky
>            Assignee: Alexey Loubyansky
>             Fix For: 8.1.0.CR1, 8.1.0.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 was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the jboss-jira mailing list