mirror of
https://github.com/morluto/rea.git
synced 2026-11-16 03:33:25 +00:00
19 lines
588 B
TypeScript
19 lines
588 B
TypeScript
import type { PYTHON_PYC_LIMIT_MAXIMA } from "../domain/python/pythonPyc.js";
|
|
|
|
/** The ParseFailure format of a standalone CPython pyc. */
|
|
export const PYTHON_PYC_FORMAT = "python-pyc";
|
|
|
|
/** Resource boundary exceeded while walking marshal objects. */
|
|
export class PythonPycResourceFailure extends Error {
|
|
constructor(
|
|
readonly boundary: "objects" | "depth" | "string",
|
|
readonly reported_limits: Readonly<
|
|
Partial<Record<keyof typeof PYTHON_PYC_LIMIT_MAXIMA, number>>
|
|
>,
|
|
message: string,
|
|
) {
|
|
super(message);
|
|
this.name = "PythonPycResourceFailure";
|
|
}
|
|
}
|