MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / changeErrorType

Function changeErrorType

framework/utils/lib/utils.ts:204–209  ·  view source on GitHub ↗
(err: any, Err: any)

Source from the content-addressed store, hash-verified

202}
203
204export function changeErrorType(err: any, Err: any) {
205 const e = new Err(err.message);
206 e.stack = err.stack;
207 if (err.params) e.params = err.params;
208 return e;
209}
210
211export async function findFile(pathname: string, doThrow = true) {
212 if (await fs.pathExists(path.resolve(pathname))) return path.resolve(pathname);

Callers 1

readCasesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected