[whatwg] pattern attribute

Ave Wrigley ave.wrigley at itn.co.uk
Mon Aug 23 05:40:22 PDT 2004


Ian Hickson wrote:
> > The silent dropping of errors was one of the main catalysts to the 
> > success
> > of the Web, IMHO.
> > 
> > One of WHATWG's design principles is based on this:
> > 
> > # Users should not be exposed to authoring errors
> > #
> > # Specifications must specify exact error recovery behaviour for each
> > # possible error scenario. Error handling should for the most part be 
> > # defined in terms of graceful error recovery (as in CSS), rather than 
> > # obvious and catastrophic failure (as in XML).
> >  -- http://www.w3.org/2004/04/webapps-cdf-ws/papers/opera.html
> 
> I hate to admit it, but you have a very good point. I guess I'm put off 
> by the idea due to being a programmer at heart ;)

My only point on this would be that an invalid regex error is very
likely to be a "development time" rather than a "run time" error as it
is not related to the (possibly variable) user input. The opportunity
for graceful recovery from errors that made the web so successful
depends on the ability to DWIM in most circumstances. This is not the
case here; it is almost never the case for invalid regexes that to DWIM
is to do nothing (IMHO!). If an invalid regex throws an exception, this
should never be seen by an end user, as it should always be picked up by
a developer. It is not dissimilar to the behaviour for invalid
javascript in <script> tags.

Ave.

-- 
Ave Wrigley, Head of Development, ITN New Media
200 Grays Inn Rd, Tel: +44-20-7430-4719
London WC1X 8XZ,  Mob: +44-7713-986247
United Kingdom    mailto:ave.wrigley at itn.co.uk



More information about the whatwg mailing list