code: public static String getStackTraceAsString(StackTraceElement[] trace, String separator) {
  
          String result = "";
          for (StackTraceElement elem : trace) {
              result += elem.toString();
              result += separator;
          }
          return result;
      }
docs: Returns the stack trace as a string.<p>
  
  @param trace the stack trace
  @param separator the separator between the lines of the stack trace
  
  @return a string representing a stack trace