mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-13 04:08:29 +01:00
Answer stability round 1: the docs name V8's array limit in one text node, a test pins Invalid array length, and item 106 takes the readers' RangeError and JavaScriptCore's Out of memory
This commit is contained in:
+1
-1
@@ -52,6 +52,6 @@ export function withinEngineLimits<T>(convert: () => Result<T>): Result<T> {
|
||||
} catch (error) {
|
||||
// A stack overflow is a bug (docs/decisions.md §Nothing recurses unbounded), so it stays a throw.
|
||||
if (!(error instanceof Error) || !engineLimitThrows.includes(`${error.name}: ${error.message}`)) throw error
|
||||
return failure('unsupported-node-shape', `the output runs past what this JavaScript engine holds: ${error.message}`, [])
|
||||
return failure('unsupported-node-shape', `the output would be longer than the longest string or array this JavaScript engine builds (${error.message})`, [])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user