massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / table / node_modules / ajv / lib / compile / validate / keyword.ts
index 50dcad17496f07143e3215214048c6b0aac6bfc6..f854aa71083ca28c01f8064fdca177a847e6f308 100644 (file)
@@ -144,7 +144,7 @@ export function validSchemaType(
 }
 
 export function validateKeywordUsage(
-  {schema, opts, self}: SchemaObjCxt,
+  {schema, opts, self, errSchemaPath}: SchemaObjCxt,
   def: AddedKeywordDefinition,
   keyword: string
 ): void {
@@ -161,7 +161,9 @@ export function validateKeywordUsage(
   if (def.validateSchema) {
     const valid = def.validateSchema(schema[keyword])
     if (!valid) {
-      const msg = "keyword value is invalid: " + self.errorsText(def.validateSchema.errors)
+      const msg =
+        `keyword "${keyword}" value is invalid at path "${errSchemaPath}": ` +
+        self.errorsText(def.validateSchema.errors)
       if (opts.validateSchema === "log") self.logger.error(msg)
       else throw new Error(msg)
     }