Files
zopu-code/repos/effect-smol/packages/effect/src/internal/errors.ts
T

10 lines
249 B
TypeScript

import { formatPath } from "../Formatter.ts"
/** @internal */
export function errorWithPath(message: string, path: ReadonlyArray<PropertyKey>) {
if (path.length > 0) {
message += `\n at ${formatPath(path)}`
}
return new Error(message)
}