whole_func_string: function getFullErrorStack(ex) {
    var ret = ex.stack;
    if(ex.cause && typeof(ex.cause) === 'function') {
      var cex = ex.cause();
      if(cex) {
        ret += '\nCaused by: ' + getFullErrorStack(cex);
      }
    }
    return ret;
  }
func_code_string: function getFullErrorStack(ex) {
    var ret = ex.stack;
    if(ex.cause && typeof(ex.cause) === 'function') {
      var cex = ex.cause();
      if(cex) {
        ret += '\nCaused by: ' + getFullErrorStack(cex);
      }
    }
    return ret;
  }
func_documentation_string: Dumps long stack traces for exceptions having a cause() method.
  
  @param ex The exception.
  
  @return A string representation of the error stack.