MCPcopy Create free account
hub / github.com/freecodexyz/free-code / constructor

Method constructor

src/utils/readFileInRange.ts:58–66  ·  view source on GitHub ↗
(
    public sizeInBytes: number,
    public maxSizeBytes: number,
  )

Source from the content-addressed store, hash-verified

56
57export class FileTooLargeError extends Error {
58 constructor(
59 public sizeInBytes: number,
60 public maxSizeBytes: number,
61 ) {
62 super(
63 `File content (${formatFileSize(sizeInBytes)}) exceeds maximum allowed size (${formatFileSize(maxSizeBytes)}). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.`,
64 )
65 this.name = 'FileTooLargeError'
66 }
67}
68
69// ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 1

formatFileSizeFunction · 0.85

Tested by

no test coverage detected