code: public static String getRootCauseAndStackTrace(Throwable t, int depth) {
  
  		while(t.getCause() != null) {
  			t = t.getCause();
  		}
  		return t.toString() + "\n" + getStackTrace(t, depth, null);
  	}
docs: Retrieves stack trace from throwable.
  
  @param t
  @param depth
  @return