Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-3101

CLI: hide stacktraces for exceptions w/o messages when logging errors

    Details

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                aloubyansky Oleksiy Lubyanskyy
                Reporter:
                aloubyansky Oleksiy Lubyanskyy
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: