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