W3C home > Mailing lists > Public > www-svg@w3.org > April 2012

Re: replacing SVGException with new style Web IDL exceptions

From: Cameron McCormack <cam@mcc.id.au>
Date: Tue, 10 Apr 2012 14:41:20 +1000
Message-ID: <4F83B9F0.6000101@mcc.id.au>
To: Rik Cabanier <cabanier@gmail.com>
CC: SVG public list <www-svg@w3.org>
Rik Cabanier:
> Will this cause issue with backward compatibility?

If script:

   * checks for the existence of window.SVGException or looks up constant
     values on it
   * checks whether the exception thrown by these operations is
     instanceof SVGException
   * checks the "code" property of the exception object

then yes.  But as I say I think it is unlikely there is script out there 
that cares about these exceptions currently, apart from some exception 
being thrown perhaps.

> If so, can we define it so that the exceptions implement both interfaces?

We could keep the current exceptions and give them names like 
"InvalidValueError" and "MatrixNotInvertible", which you could look up 
with .name on the exception object, but keep everything else the same.

But I don't think it is worth it.
Received on Tuesday, 10 April 2012 04:41:55 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:50 GMT