Add assert messages for all assertions up until ol.renderer.vector.

This commit is contained in:
Bart van den Eijnden
2015-03-30 16:41:32 +02:00
parent fb9ba22c30
commit 47ce127a10
74 changed files with 1173 additions and 682 deletions

View File

@@ -92,8 +92,10 @@ ol.array.linearFindNearest = function(arr, target, direction) {
* @param {number} end End index.
*/
ol.array.reverseSubArray = function(arr, begin, end) {
goog.asserts.assert(begin >= 0);
goog.asserts.assert(end < arr.length);
goog.asserts.assert(begin >= 0,
'Array begin index should be equal to or greater than 0');
goog.asserts.assert(end < arr.length,
'Array end index should be less than the array length');
while (begin < end) {
var tmp = arr[begin];
arr[begin] = arr[end];