| | 2 | |
| | 3 | === Function return values === |
| | 4 | |
| | 5 | Before commit [*] a few functions in the library displayed error messages and returned {{{undefined}}}, {{{null}}} or {{{false}}} if the parameters passed in were bad. With this commit these functions now just throw an error. For example, the {{{Map.addLayer}}} function used to return {{{false}}} if the layer was already in the map, it now throws an {{{Error}}} exception. People relying on return values to that function calls are successful need change their code. |
| | 6 | |
| | 7 | * {{{OpenLayers.Bounds.add}}} throws a {{{TypeError}}} exception if {{{x}}} or {{{y}}} is null |
| | 8 | * {{{OpenLayers.LonLat.add}}} throws a {{{TypeError}}} exception if {{{lon}}} or {{{lat}}} is null |
| | 9 | * {{{OpenLayers.Pixel.add}}} throws a {{{TypeError}}} exception if {{{x}}} or {{{y}}} is null |
| | 10 | * {{{OpenLayers.Filter.Comparison.value2regex}}} throws an {{{Error}}} exception if {{{wildcard}}} equals to {{{"."}}} |
| | 11 | * {{{OpenLayers.Layer.PointTrack.addNodes}}}} throws a {{{TypeError}}} exception if {{{endPoint}}} isn't actually a point |
| | 12 | * {{{OpenLayers.Layer.Vector.getFeatureFromEvent}}} throws an {{{Error}}} exception if the layer has no renderer |
| | 13 | * {{{OpenLayers.Map.addLayer}}} throws a {{{TypeError}}} exception if the layer is already in the map |
| | 14 | |
| | 15 | [*] <https://github.com/openlayers/openlayers/commit/6e9a3e4c13e00c29daf28efd92b63c2390e69231> |