<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Functions with a return type of ExceptionOr<String> cannot "return emptyString();""
href="https://bugs.webkit.org/show_bug.cgi?id=165477#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Functions with a return type of ExceptionOr<String> cannot "return emptyString();""
href="https://bugs.webkit.org/show_bug.cgi?id=165477">bug 165477</a>
from <span class="vcard"><a class="email" href="mailto:jer.noble@apple.com" title="Jer Noble <jer.noble@apple.com>"> <span class="fn">Jer Noble</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=165477#c2">comment #2</a>)
<span class="quote">> Let me know if the workaround works or not.</span >
It does!
<span class="quote">> I’m sure we can come up with a way to make the syntax more elegant if this
> comes up a lot.</span >
I understand the motivation for not allowing "initialization-by-copy-constructor" by default, but I think this pattern may become more common. Enum values in WebIDL are turn into Strings in the bindings, and I've often defined "static const String& enumValue();" methods in tho bound classes to represent each enumerated value. A getter that can either return an enum value or throw an exception will likely hit this quirk. It may be worth it to make an exception (hah!) for ExceptionOr<String> or ExceptionOr<AtomicString>.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>