mirror of
https://github.com/morluto/rea.git
synced 2026-11-16 03:33:25 +00:00
refactor(python): report pyc format failures through ParseFailure (#10664)
This commit is contained in:
1 parent
51e9dc156f
commit
b33e5c4867
5 files changed
+39
-65
No files matched your search
@@ -1,15 +1,7 @@
|
||||
import type { PYTHON_PYC_LIMIT_MAXIMA } from "../domain/python/pythonPyc.js";
|
||||
|
||||
/** Distinguish corrupt recognized pycs from magics outside parser coverage. */
|
||||
export class PythonPycFormatFailure extends Error {
|
||||
constructor(
|
||||
readonly kind: "malformed" | "unsupported",
|
||||
message: string,
|
||||
) {
|
||||
super(message);
|
||||
this.name = "PythonPycFormatFailure";
|
||||
}
|
||||
}
|
||||
/** 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 {
|
||||
|
||||
Reference in new issue
Block a user