title: Custom Exception message with new line in Java
body: <p>I am throwing a custom exception as below to UI </p>
  
  <pre><code>StringBuilder errorMessage = new StringBuilder("Error One Message"); 
  String newlinetest = System.getProperty("line.separator");
                    // String sep = System.line.separator;
  String secondErrorMessage = "Error Two message";
  throw new ErrorWhileCreatingMessageException(errorMessage+"\r\n"+secondErrorMessage);
  </code></pre>
  
  <p>I need to add new line between two error messages before throwing. I tried \n, \r\n and line. separator it didn't work. Any help on this is much appreciated  </p>
  
  <p>I am using Angular JS in the UI. I am displaying as below</p>
  
  <pre><code>&lt;div ng-show="error != null"&gt;
      &lt;div class="alert alert-danger" role="alert" ng-bind="error"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>