function searchRecursiveByType (v, t) {
      var res = [];
      var i;
      var r;
      for (i in v) {
        if (v[i] instanceof t) {
          res.push(v[i]);
        } else if (typeof v[i] === 'object') {
          r = searchRecursiveByType(v[i], t);
          if (r.length) {
            res = res.concat(r);
          }
        }
      }
      return res;
    }
return the error list, empty if there were no errors