[OpenLayers-Trac] [OpenLayers] #746: add() function should be tolerant to omitted y value

OpenLayers trac at openlayers.org
Fri Jun 29 13:32:33 EDT 2007


#746: add() function should be tolerant to omitted y value
----------------------+-----------------------------------------------------
  Reporter:  euzuro   |       Owner:             
      Type:  feature  |      Status:  new        
  Priority:  minor    |   Milestone:  2.5 Release
 Component:  general  |     Version:  2.4        
Resolution:           |    Keywords:             
----------------------+-----------------------------------------------------
Comment (by tschaub):

 This is now redundant, but I'll add it anyway (I was typing as the last
 comment was being added)

 I'm -1 on this as well.  I think forgiveness is good.  I also think too
 much forgiveness of this type (or sanity patches) can make debugging hard.
 If a user passes one argument to add, they should know that it is wrong.
 They may, for example, pass in another pixel and assume that it is going
 to be added to the first.  We've got the console now, we should at least
 be calling OpenLayers.Console.error (if not actually throwing an
 exception).

 I know this goes against "be tolerant in what you accept" - but this comes
 from the perspective of a debugger.  Debugging is hard.  Most "bugs" in
 OpenLayers are user (or application developer) error.  The more we swallow
 user errors, the harder it becomes to debug an application.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/746#comment:4>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list