MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / constructor

Method constructor

src/db/wsl-shared-index.ts:47–63  ·  view source on GitHub ↗
(original: Error, dataDir: string)

Source from the content-addressed store, hash-verified

45 readonly errstr: unknown;
46
47 constructor(original: Error, dataDir: string) {
48 super(
49 `${original.message} on the CodeGraph index at ${dataDir}\n` +
50 "This project is on a Windows drive, where SQLite's file locking doesn't work across " +
51 'the Windows/WSL boundary, so this usually means CodeGraph on Windows is using the same ' +
52 "index. Windows and WSL can't share one index on a Windows drive; give WSL its own:\n" +
53 ` 1. Set CODEGRAPH_DIR=${WSL_CODEGRAPH_DIR} in the WSL environment (your shell profile, ` +
54 'or the env of the MCP server your agent starts).\n' +
55 ` 2. Run "codegraph init" in WSL to build that index. Windows keeps using ${DEFAULT_CODEGRAPH_DIR}.`,
56 { cause: original }
57 );
58 this.name = 'WslSharedIndexError';
59 const codes = original as Error & { code?: unknown; errcode?: unknown; errstr?: unknown };
60 this.code = codes.code;
61 this.errcode = codes.errcode;
62 this.errstr = codes.errstr;
63 }
64}
65
66/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected