Enhance ripgrep error handling and utility functions

🤖 Generated with [OpenCode](https://opencode.ai)

Co-Authored-By: OpenCode <noreply@opencode.ai>
This commit is contained in:
Dax Raad
2025-06-10 11:06:01 -04:00
parent c3ab370344
commit fa7416687b
2 changed files with 15 additions and 16 deletions

View File

@@ -1,4 +1,7 @@
import { z, type ZodSchema } from "zod"
import { Log } from "./log"
const log = Log.create()
export abstract class NamedError extends Error {
abstract schema(): ZodSchema
@@ -24,6 +27,7 @@ export abstract class NamedError extends Error {
) {
super(name, options)
this.name = name
log.error(name, this.data)
}
static isInstance(input: any): input is InstanceType<typeof result> {