mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:57:35 +00:00
BindingsGenerator: Allow stringifier to return DOMException if needed
This commit is contained in:
parent
e8bd067ce5
commit
511ce240f2
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
* Copyright (c) 2021-2023, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2021, Luke Wilde <lukew@serenityos.org>
|
||||
* Copyright (c) 2022, Ali Mohammad Pur <mpfard@serenityos.org>
|
||||
* Copyright (c) 2023, Kenneth Myhra <kennethmyhra@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -2794,7 +2795,7 @@ JS_DEFINE_NATIVE_FUNCTION(@class_name@::to_string)
|
|||
)~~~");
|
||||
if (interface.stringifier_attribute.has_value()) {
|
||||
stringifier_generator.append(R"~~~(
|
||||
auto retval = impl->@attribute.cpp_getter_name@();
|
||||
auto retval = TRY(throw_dom_exception_if_needed(vm, [&] { return impl->@attribute.cpp_getter_name@(); }));
|
||||
)~~~");
|
||||
} else {
|
||||
stringifier_generator.append(R"~~~(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue