Files
SnowLuma/.pnpm-store/v11/files/7e/fa286f2b2abcd49a8d4962099325a3fd9427634153528e69b055c856348b1bd9325b38e573b389d08f00e7e09664573f02d47421b94bdbde99072189609f26
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

14 lines
513 B
Plaintext

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