mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 02:13:56 +09:00
LibJS: Implement "throw"
You can now throw an expression to the nearest catcher! :^) To support throwing arbitrary values, I added an Exception class that sits as a wrapper around whatever is thrown. In the future it will be a logical place to store a call stack.
This commit is contained in:
parent
db024a9cb1
commit
faddf3a1db
Notes:
sideshowbarker
2024-07-19 08:08:37 +09:00
Author: https://github.com/awesomekling
Commit: faddf3a1db
13 changed files with 160 additions and 7 deletions
|
@ -188,7 +188,7 @@ Value Interpreter::call(Function* function, Value this_value, const Vector<Value
|
|||
return result;
|
||||
}
|
||||
|
||||
Value Interpreter::throw_exception(Error* exception)
|
||||
Value Interpreter::throw_exception(Exception* exception)
|
||||
{
|
||||
m_exception = exception;
|
||||
unwind(ScopeType::Try);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue