Replace 'throw new Error' by 'goog.asserts.fail'

This commit is contained in:
Frederic Junod
2014-08-21 15:22:01 +02:00
parent 15a516fd62
commit fb1d7e0c50
2 changed files with 3 additions and 3 deletions

View File

@@ -57,7 +57,7 @@ ol.geom.SimpleGeometry.getLayoutForStride_ = function(stride) {
} else if (stride == 4) {
return ol.geom.GeometryLayout.XYZM;
} else {
throw new Error('unsupported stride: ' + stride);
goog.asserts.fail('unsupported stride: ' + stride);
}
};
@@ -77,7 +77,7 @@ ol.geom.SimpleGeometry.getStrideForLayout_ = function(layout) {
} else if (layout == ol.geom.GeometryLayout.XYZM) {
return 4;
} else {
throw new Error('unsupported layout: ' + layout);
goog.asserts.fail('unsupported layout: ' + layout);
}
};