packages/shex-writer/shex-writer.js
/** _throwError: overridable function to throw Errors().
 *
 * @param func (optional): function at which to truncate stack trace
 * @param str: error message
 */
overridable function to throw Errors().
@param func (optional): function at which to truncate stack trace
@param str: error message
overridable function to throw Errors () . @param func ( optional ) : function at which to truncate stack trace @param str : error message
function _throwError (func, str) {
  if (typeof func !== "function") {
    str = func;
    func = _throwError;
  }
  const e = new Error(str);
  Error.captureStackTrace(e, func);
  throw e;
}
function _throwError ( func , str ) { if ( typeof func !== "function" ) { str = func ; func = _throwError ; } const e = new Error ( str ) ; Error . captureStackTrace ( e , func ) ; throw e ; }
_throwError: overridable function to throw Errors().
_throwError : overridable function to throw Errors () .