Replace 'throw new Error' by 'goog.asserts.fail'
This commit is contained in:
@@ -242,7 +242,7 @@ ol.color.fromStringInternal_ = function(s) {
|
|||||||
color = [r, g, b, 1];
|
color = [r, g, b, 1];
|
||||||
return ol.color.normalize(color, color);
|
return ol.color.normalize(color, color);
|
||||||
} else {
|
} else {
|
||||||
throw new Error(s + ' is not a valid color');
|
goog.asserts.fail(s + ' is not a valid color');
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ ol.geom.SimpleGeometry.getLayoutForStride_ = function(stride) {
|
|||||||
} else if (stride == 4) {
|
} else if (stride == 4) {
|
||||||
return ol.geom.GeometryLayout.XYZM;
|
return ol.geom.GeometryLayout.XYZM;
|
||||||
} else {
|
} 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) {
|
} else if (layout == ol.geom.GeometryLayout.XYZM) {
|
||||||
return 4;
|
return 4;
|
||||||
} else {
|
} else {
|
||||||
throw new Error('unsupported layout: ' + layout);
|
goog.asserts.fail('unsupported layout: ' + layout);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user