all files / ol/ asserts.js

80% Statements 4/5
50% Branches 1/2
100% Functions 1/1
80% Lines 4/5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15               12×        
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) {
  Iif (!assertion) {
    throw new ol.AssertionError(errorCode);
  }
};