Files
openlayers/src/ol/asserts.js
2016-08-12 10:53:47 -06:00

16 lines
319 B
JavaScript

goog.provide('ol.asserts');
goog.require('ol');
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);
}
};