mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-24 18:28:57 +00:00
LibJS: Implement non standard error.stack attribute
All other browser already support this feature. There is a Stage 1 proposal to standardize this, but it does not seem to be active.
This commit is contained in:
parent
8c3942d90c
commit
89c82abf1f
Notes:
sideshowbarker
2024-07-17 19:40:04 +09:00
Author: https://github.com/Hendiadyoin1
Commit: 89c82abf1f
Pull-request: https://github.com/SerenityOS/serenity/pull/12318
Reviewed-by: https://github.com/davidot
Reviewed-by: https://github.com/linusg ✅
6 changed files with 100 additions and 0 deletions
|
@ -23,7 +23,13 @@ public:
|
|||
explicit Error(Object& prototype);
|
||||
virtual ~Error() override = default;
|
||||
|
||||
String const& stack_string() const { return m_stack_string; }
|
||||
|
||||
ThrowCompletionOr<void> install_error_cause(Value options);
|
||||
|
||||
private:
|
||||
void populate_stack();
|
||||
String m_stack_string {};
|
||||
};
|
||||
|
||||
// NOTE: Making these inherit from Error is not required by the spec but
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue