Use goog.asserts.fail
This commit is contained in:
@@ -74,7 +74,7 @@ ol.array.linearFindNearest = function(arr, target, direction) {
|
||||
}
|
||||
// We should never get here, but the compiler complains
|
||||
// if it finds a path for which no number is returned.
|
||||
goog.asserts.assert(false);
|
||||
goog.asserts.fail();
|
||||
return n - 1;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -226,7 +226,7 @@ ol.control.ScaleLine.prototype.updateElement_ = function(frameState) {
|
||||
pointResolution /= 1609.3472;
|
||||
}
|
||||
} else {
|
||||
goog.asserts.assert(false);
|
||||
goog.asserts.fail();
|
||||
}
|
||||
|
||||
var i = 3 * Math.floor(
|
||||
|
||||
@@ -77,7 +77,7 @@ ol.dom.transformElement2D = function(element, transform, opt_precision) {
|
||||
ol.dom.setTransform(element, 'matrix(' + value2D + ')');
|
||||
} else if (ol.dom.BrowserFeature.CAN_USE_MATRIX_FILTER) {
|
||||
// http://msdn.microsoft.com/en-us/library/ms533014%28VS.85,loband%29.aspx
|
||||
goog.asserts.assert(false); // FIXME
|
||||
goog.asserts.fail(); // FIXME
|
||||
} else {
|
||||
// FIXME check this code!
|
||||
var style = element.style;
|
||||
|
||||
@@ -610,7 +610,7 @@ ol.projection.getTransformFromProjections =
|
||||
ol.projection.identityTransform = function(input, opt_output, opt_dimension) {
|
||||
if (goog.isDef(opt_output) && input !== opt_output) {
|
||||
// TODO: consider making this a warning instead
|
||||
goog.asserts.assert(false, 'This should not be used internally.');
|
||||
goog.asserts.fail('This should not be used internally.');
|
||||
for (var i = 0, ii = input.length; i < ii; ++i) {
|
||||
opt_output[i] = input[i];
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ ol.renderer.canvas.Map.prototype.createLayerRenderer = function(layer) {
|
||||
} else if (layer instanceof ol.layer.Vector) {
|
||||
return new ol.renderer.canvas.VectorLayer(this, layer);
|
||||
} else {
|
||||
goog.asserts.assert(false);
|
||||
goog.asserts.fail();
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -313,7 +313,7 @@ ol.renderer.webgl.Map.prototype.createLayerRenderer = function(layer) {
|
||||
} else if (layer instanceof ol.layer.ImageLayer) {
|
||||
layerRenderer = new ol.renderer.webgl.ImageLayer(this, layer);
|
||||
} else {
|
||||
goog.asserts.assert(false);
|
||||
goog.asserts.fail();
|
||||
}
|
||||
return layerRenderer;
|
||||
};
|
||||
|
||||
@@ -235,7 +235,7 @@ ol.source.WMTS.optionsFromCapabilities = function(wmtsCap, layer) {
|
||||
goog.asserts.assert(urls.length > 0);
|
||||
break;
|
||||
default:
|
||||
goog.asserts.assert(false);
|
||||
goog.asserts.fail();
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user