summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/WebIDL/ExceptionOr.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/WebIDL/ExceptionOr.h')
-rw-r--r--Userland/Libraries/LibWeb/WebIDL/ExceptionOr.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/WebIDL/ExceptionOr.h b/Userland/Libraries/LibWeb/WebIDL/ExceptionOr.h
index b27a506dcf..cb0eaa52d0 100644
--- a/Userland/Libraries/LibWeb/WebIDL/ExceptionOr.h
+++ b/Userland/Libraries/LibWeb/WebIDL/ExceptionOr.h
@@ -110,6 +110,12 @@ public:
return !m_exception.template has<Empty>();
}
+ ValueType release_value_but_fixme_should_propagate_errors()
+ {
+ VERIFY(!is_error());
+ return release_value();
+ }
+
// These are for compatibility with the TRY() macro in AK.
[[nodiscard]] bool is_error() const { return is_exception(); }
Variant<SimpleException, JS::NonnullGCPtr<DOMException>, JS::Completion> release_error() { return exception(); }