code: @Nonnull
    public static String getStackAsString (@Nullable final Throwable t, final boolean bOmitCommonStackTraceElements)
    {
      if (t == null)
        return "";
  
      // convert call stack to string
      final StringBuilder aCallStack = _getRecursiveStackAsStringBuilder (t,
                                                                          null,
                                                                          null,
                                                                          1,
                                                                          bOmitCommonStackTraceElements);
  
      // avoid having a separator at the end -> remove the last char
      if (StringHelper.getLastChar (aCallStack) == STACKELEMENT_LINESEP)
        aCallStack.deleteCharAt (aCallStack.length () - 1);
  
      // no changes
      return aCallStack.toString ();
    }
docs: Get the stack trace of a throwable as string.
  
  @param t
  The throwable to be converted. May be <code>null</code>.
  @param bOmitCommonStackTraceElements
  If <code>true</code> the stack trace is cut after certain class
  names occurring. If <code>false</code> the complete stack trace is
  returned.
  @return the stack trace as newline separated string. If the passed
  Throwable is <code>null</code> an empty string is returned.