8400 }),
8401 (e.Vector.prototype.insert = function (e, t) {
8402 this.upsert(e, t, function () {
8403 throw 'duplicate index' 8404 })
8405 }),
8406 (e.Vector.prototype.upsert = function (e, t, r) {
8177 (e.FieldRef.joiner = '/'),
8178 (e.FieldRef.fromString = function (t) {
8179 const r = t.indexOf(e.FieldRef.joiner)
8180 if (r === -1) throw 'malformed field ref string' 8181 const i = t.slice(0, r)
8182 const n = t.slice(r + 1)
8183 return new e.FieldRef(n, i, t)
358 return
359 }
360
361 throw `unsupported type ${field_name}: (${typeof value}) ${value}`362 }
363}
315 _my.no_overflow53(value.toInt(), field_name)
316 return
317 }
318 throw `unsupported type ${field_name}: (${typeof value}) ${value}`319 },
320
321 // signed / unsigned whole numbers only
132 if (Long.isLong(value)) {
133 return value.toString()
134 }
135 throw `unsupported type ${field_name}: (${typeof value}) ${value}`136 },
137
138 require_test (regex, value, field_name = '') {
It is considered good practice to only throw
the Error
object itself or an object using the Error
object as base objects for user-defined exceptions.
The benefit of Error
objects is that they automatically keep track of where they were built and originated.
This rule restricts what can be thrown as an exception.
throw "error";
throw 0;
throw undefined;
throw null;
var err = new Error();
throw "an " + err;
// err is recast to a string literal
var err = new Error();
throw `${err}`
throw new Error();
throw new Error("error");
var e = new Error("error");
throw e;
try {
throw new Error("error");
} catch (e) {
throw e;
}