projecte_ionic/node_modules/ajv/lib/compile/ref_error.ts
2022-02-09 18:30:03 +01:00

13 lines
428 B
TypeScript
Executable file

import {resolveUrl, normalizeId, getFullPath} from "./resolve"
export default class MissingRefError extends Error {
readonly missingRef: string
readonly missingSchema: string
constructor(baseId: string, ref: string, msg?: string) {
super(msg || `can't resolve reference ${ref} from id ${baseId}`)
this.missingRef = resolveUrl(baseId, ref)
this.missingSchema = normalizeId(getFullPath(this.missingRef))
}
}