code: private String getMessage(boolean localized) {
          String msg = localized ? super.getLocalizedMessage() : super.getMessage();
          StringBuilder sb = new StringBuilder(msg == null ? "" : msg);
          
          for (Throwable exception : exceptions) {
              msg = localized ? exception.getLocalizedMessage() : exception.getMessage();
              
              if (msg != null) {
                  sb.append(sb.length() == 0 ? "" : "\n\n").append(msg);
              }
          }
          
          return sb.toString();
      }
docs: Creates composite exception message (localized or not).
  
  @param localized If true, return the localized version.
  @return A composite of all exception messages.