openlayers
Version:
Build tools and sources for developing OpenLayers based mapping applications
15 lines (11 loc) • 299 B
JavaScript
goog.provide('ol.asserts');
goog.require('ol.AssertionError');
/**
* @param {*} assertion Assertion we expected to be truthy.
* @param {number} errorCode Error code.
*/
ol.asserts.assert = function(assertion, errorCode) {
if (!assertion) {
throw new ol.AssertionError(errorCode);
}
};