[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
Thu Jul 3 04:56:24 EDT 2014


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

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

Joe Wertz <ewertz at redhat.com> changed the Status of [bug 997584|https://bugzilla.redhat.com/show_bug.cgi?id=997584] from ASSIGNED to POST

> 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.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.2.6#6264)


More information about the jboss-jira mailing list