lib/bond.js
function resolveModule(path, options, mod) { // XXX this is ineffecient. must cache
  var result = null
  var filepath = resolveFilename(path, mod)
  try {
    result = mod.require(filepath)
  } catch (e) {
    var error = undefined
    if (e instanceof errors.ResolveModuleSyntaxError) {
      error = e
    } else if (e instanceof SyntaxError) {
      error = new errors.ResolveModuleSyntaxError(e, filepath)
    } else {
      error = new Error("Error loading module: " + filepath + " " + e.stack)
    }
    throw error
  }
  return result
}
function resolveModule(path, options, mod) { // XXX this is ineffecient. must cache
  var result = null
  var filepath = resolveFilename(path, mod)
  try {
    result = mod.require(filepath)
  } catch (e) {
    var error = undefined
    if (e instanceof errors.ResolveModuleSyntaxError) {
      error = e
    } else if (e instanceof SyntaxError) {
      error = new errors.ResolveModuleSyntaxError(e, filepath)
    } else {
      error = new Error("Error loading module: " + filepath + " " + e.stack)
    }
    throw error
  }
  return result
}
*************************************************************************************************
@method resolveModule
@memberof bond
@ignore