UNPKG

openlayers

Version:

Build tools and sources for developing OpenLayers based mapping applications

15 lines (11 loc) 299 B
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); } };