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
+4 -2
View File
@@ -104,7 +104,8 @@ ol.Feature = function(opt_geometryOrProperties) {
var geometry = /** @type {ol.geom.Geometry} */ (opt_geometryOrProperties);
this.setGeometry(geometry);
} else {
goog.asserts.assert(goog.isObject(opt_geometryOrProperties));
goog.asserts.assert(goog.isObject(opt_geometryOrProperties),
'opt_geometryOrProperties should be an Object');
var properties = /** @type {Object.<string, *>} */
(opt_geometryOrProperties);
this.setProperties(properties);
@@ -320,7 +321,8 @@ ol.feature.createFeatureStyleFunction = function(obj) {
if (goog.isArray(obj)) {
styles = obj;
} else {
goog.asserts.assertInstanceof(obj, ol.style.Style);
goog.asserts.assertInstanceof(obj, ol.style.Style,
'obj should be an ol.style.Style');
styles = [obj];
}
styleFunction = goog.functions.constant(styles);