On Jul 7, 2011, at 21:47 , Ian Hickson wrote:
> On Thu, 7 Jul 2011, Jonas Sicking wrote:
>>
>> It's a pain since it forces us to try to coordinate codes across
>> multiple specifications, working groups and standards organizations.
>
> Anything that allows us to _not_ coordinate is an epic disaster, IMHO.
>
> We absolutely should be coordinating. How else can we ensure the platform
> is a consistent platform?
>
> This is a feature, not a bug.
Obviously we should coordinate, but coordination is time-consuming. We
shouldn't set ourselves up in such a way that we need to coordinate over every
last detail — some things should be such that they just work, without requiring
WebApps, HTML, DAP, Web Notifications, CSS, Web Performance, WHAT, MAWG, RDF
WebApps, SVG, Geolocation, and several I'm forgetting about to all talk
together.
Having to coordinate over whether your exception code should be 17 or 42 is a
waste of time, time best spent on coordinating over issues that actually
matter. It's also too easy to overlook. We've shot ourselves in the feet
repeatedly with this one, a change wouldn't hurt.
>> Lastly, the syntax:
>> if (ex.name === "HierarchyRequestError") { ... }
>> is a lot easier on the eyes than:
>> if (ex.code === DOMException.HIERARCHY_REQUEST_ERR) { ... }
>> IMHO.
>
> I've no problem with adding names to all the current exceptions, if we
> want to do that. (I generally am averse to using strings for values, since
> they don't syntax check well, but in JS that game is somewhat lost in the
> above scenario anyway, so whatever.)
Yeah, it's completely lost in JS, if you typo either of the above variants they
both fail silently.
--
Robin Berjon - http://berjon.com/ - @robinberjon