src/raygun.utilities/errorUtilities.js
/**
     * Check if the current stacktrace has any lines that have a url that matches the current url. This function can be
     * passed a list of whitelisted domains that will be checked against.
     *
     * @param stackTrace
     * @param whitelistedScriptDomains string[]
     * @returns {boolean}
     */
Check if the current stacktrace has any lines that have a url that matches the current url. This function can be
passed a list of whitelisted domains that will be checked against.

@param stackTrace
@param whitelistedScriptDomains string[]
@returns {boolean}
Check if the current stacktrace has any lines that have a url that matches the current url . This function can be passed a list of whitelisted domains that will be checked against . @param stackTrace @param whitelistedScriptDomains string [] @returns { boolean }
function stackTraceHasValidDomain(stackTrace, whitelistedScriptDomains) {
      var foundValidDomain = false;
      for (var i = 0; !foundValidDomain && stackTrace.stack && i < stackTrace.stack.length; i++) {
        var stackLine = stackTrace.stack[i];
        if (!utils.isNil(stackLine) && !utils.isNil(stackLine.url)) {
          for (var j in whitelistedScriptDomains) {
            if (whitelistedScriptDomains.hasOwnProperty(j)) {
              if (stackLine.url.indexOf(whitelistedScriptDomains[j]) > -1) {
                foundValidDomain = true;
              }
            }
          }
          if (stackLine.url.indexOf(currentLocation.host) > -1) {
            foundValidDomain = true;
          }
        }
      }
      return foundValidDomain;
    }
function stackTraceHasValidDomain ( stackTrace , whitelistedScriptDomains ) { var foundValidDomain = false ; for ( var i = 0 ; ! foundValidDomain && stackTrace . stack && i < stackTrace . stack . length ; i ++ ) { var stackLine = stackTrace . stack [ i ] ; if ( ! utils . isNil ( stackLine ) && ! utils . isNil ( stackLine . url ) ) { for ( var j in whitelistedScriptDomains ) { if ( whitelistedScriptDomains . hasOwnProperty ( j ) ) { if ( stackLine . url . indexOf ( whitelistedScriptDomains [ j ] ) > - 1 ) { foundValidDomain = true ; } } } if ( stackLine . url . indexOf ( currentLocation . host ) > - 1 ) { foundValidDomain = true ; } } } return foundValidDomain ; }
Check if the current stacktrace has any lines that have a url that matches the current url.
Check if the current stacktrace has any lines that have a url that matches the current url .