1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:07:34 +00:00

LibJS: Add ErrorType::CallStackSizeExceeded

I'm about to add another use of this, so let's add an ErrorType for it
instead of hardcoding the message for a third time.
This commit is contained in:
Linus Groh 2021-09-05 20:13:06 +01:00
parent 782e7834c3
commit 9998a2c91e
3 changed files with 3 additions and 2 deletions

View file

@ -116,7 +116,7 @@ public:
VERIFY(!exception());
// Ensure we got some stack space left, so the next function call doesn't kill us.
if (did_reach_stack_space_limit())
throw_exception<Error>(global_object, "Call stack size limit exceeded");
throw_exception<Error>(global_object, ErrorType::CallStackSizeExceeded);
else
m_execution_context_stack.append(&context);
}