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
@@ -164,7 +164,8 @@ ol.format.WKT.encodeMultiPolygonGeometry_ = function(geom) {
ol.format.WKT.encode_ = function(geom) {
var type = geom.getType();
var geometryEncoder = ol.format.WKT.GeometryEncoder_[type];
goog.asserts.assert(goog.isDef(geometryEncoder));
goog.asserts.assert(goog.isDef(geometryEncoder),
'geometryEncoder should be defined');
var enc = geometryEncoder(geom);
type = type.toUpperCase();
if (enc.length === 0) {
@@ -568,7 +569,8 @@ ol.format.WKT.Parser.prototype.match = function(type) {
ol.format.WKT.Parser.prototype.parse = function() {
this.consume_();
var geometry = this.parseGeometry_();
goog.asserts.assert(this.token_.type == ol.format.WKT.TokenType.EOF);
goog.asserts.assert(this.token_.type == ol.format.WKT.TokenType.EOF,
'token type should be end of file');
return geometry;
};