[Webkit-unassigned] [Bug 16401] [GTK] GObject/C DOM binding

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 11 09:55:22 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=16401





------- Comment #152 from jim at yorba.org  2009-02-11 09:55 PDT -------
(In reply to comment #131)
> BTW, one way of dealing with this would be to add a property to the base class
> of the DOM objects that would hold the error, so you could do something like
> g_object_get (object, "dom-property", &dom, "dom-error", &error, NULL); I guess
> you'd define it so that it only holds the first error reported, to match the
> semantics of exceptions (meaning that if you try to access several properties
> at the same time you'll only get the first error in case there's several..). Of
> course setter/getter functions are easier because you can only access one
> property at a time :)

Doesn't it make more sense to simply have a global (or per-thread) "last DOM
exception" variable, a la errno?  (It could be exposed via a function call, to
be clean about it.)  Plus, it sounds like the caller would have to invoke a
"clear last error" object method before accessing a sequence of properties,
otherwise the first error will persist when no exception has occurred in the
latest batch of operations.

Although I'm not thrilled with global values for error-reporting, if the caller
is interested in capturing exceptions, then they should be using
getter/setters, where exceptions are properly reported.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list