I guess the exception of interest is
<span style="font-family: monospace; font-size: 11px; background-color: rgb(248, 248, 248); ">SQLException.</span><div><font face="monospace" size="1"><br></font></div><div><div>Take a look at Database.cpp line 103. The '
<span style="font-family: monospace; font-size: 11px; background-color: rgb(248, 248, 248); ">errorMessage</span>' string on that line contains more detailed information about what went wrong in the act of opening the database, including things like an sqlite error code and sqlite error message. These strings are formed in the bowls of AbstractDatabase::performOpenAndVerify().<br>
<br><div class="gmail_quote">On Mon, Nov 14, 2011 at 4:48 PM, Adam Barth <span dir="ltr"><<a href="mailto:abarth@webkit.org">abarth@webkit.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I'm not sure exactly what you're trying to do, but one option is to<br>
add a new type of DOMException:<br>
<br>
<a href="http://trac.webkit.org/browser/trunk/Source/WebCore/dom/DOMExceptions.in" target="_blank">http://trac.webkit.org/browser/trunk/Source/WebCore/dom/DOMExceptions.in</a><br>
<br>
Another option is to customize the message from an existing exception<br>
(here are the DOMCore exceptions):<br>
<br>
<a href="http://trac.webkit.org/browser/trunk/Source/WebCore/dom/DOMCoreException.cpp" target="_blank">http://trac.webkit.org/browser/trunk/Source/WebCore/dom/DOMCoreException.cpp</a><br>
<br>
If you show me the spec you're trying to implement, I might have a<br>
more concept suggestion of the best way to implement it.<br>
<br>
Adam<br>
<div><div class="h5"><br>
<br>
On Mon, Nov 14, 2011 at 4:44 PM, Michael Nordman <<a href="mailto:michaeln@google.com">michaeln@google.com</a>> wrote:<br>
> I have a case where given an IDL defined method thats defined to raise a<br>
> DOMException, I'd like to set a custom exception message from within the<br>
> webcore implementation and have that message percolate up into script via<br>
> the bindings layer(s) and be accessible as the exception.message attribute.<br>
> I don't see a non-custom way of doing that and am wondering if there should<br>
> be support for something like this w/o having to resort to custom bindings?<br>
> The particular methods I'm looking at are the openDatabase(...) method of<br>
> DOMWindow and WorkerContext, but this seems like it might be useful in other<br>
> cases as well.<br>
><br>
</div></div>> _______________________________________________<br>
> webkit-dev mailing list<br>
> <a href="mailto:webkit-dev@lists.webkit.org">webkit-dev@lists.webkit.org</a><br>
> <a href="http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev" target="_blank">http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev</a><br>
><br>
><br>
</blockquote></div><br></div></div>