mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:27:34 +00:00
LibJS: Implement the Error Cause proposal
Currently stage 3. https://github.com/tc39/proposal-error-cause
This commit is contained in:
parent
8d77a3297a
commit
862ba64037
11 changed files with 130 additions and 42 deletions
|
@ -16,7 +16,8 @@ class Error : public Object {
|
|||
JS_OBJECT(Error, Object);
|
||||
|
||||
public:
|
||||
static Error* create(GlobalObject&, const String& message = {});
|
||||
static Error* create(GlobalObject&);
|
||||
static Error* create(GlobalObject&, String const& message);
|
||||
|
||||
explicit Error(Object& prototype);
|
||||
virtual ~Error() override = default;
|
||||
|
@ -30,7 +31,8 @@ public:
|
|||
JS_OBJECT(ClassName, Error); \
|
||||
\
|
||||
public: \
|
||||
static ClassName* create(GlobalObject&, const String& message = {}); \
|
||||
static ClassName* create(GlobalObject&); \
|
||||
static ClassName* create(GlobalObject&, String const& message); \
|
||||
\
|
||||
explicit ClassName(Object& prototype); \
|
||||
virtual ~ClassName() override = default; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue