webgme-engine
Version:
WebGME server and Client API without a GUI
27 lines (20 loc) • 568 B
JavaScript
/*globals define*/
/*eslint-env node, browser*/
/*eslint no-console: 0*/
/**
* @author kecso / https://github.com/kecso
*/
define(['common/core/CoreInternalError'], function (CoreInternalError) {
'use strict';
var assert = function (cond, msg) {
if (!cond) {
var error = new CoreInternalError(msg || 'ASSERT failed');
if (typeof TESTING === 'undefined') {
console.log('Throwing', error.stack);
console.log();
}
throw error;
}
};
return assert;
});