release/rollbar-1.2.0.commonjs.js
function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {
        var initial = {
            'url': url,
            'line': lineNo
        };

        if (initial.url && initial.line) {
            stackInfo.incomplete = false;

            if (!initial.func) {
                initial.func = guessFunctionName(initial.url, initial.line);
            }

            if (!initial.context) {
                initial.context = gatherContext(initial.url, initial.line);
            }

            var reference = / '([^']+)' /.exec(message);
            if (reference) {
                initial.column = findSourceInLine(reference[1], initial.url, initial.line);
            }

            if (stackInfo.stack.length > 0) {
                if (stackInfo.stack[0].url === initial.url) {
                    if (stackInfo.stack[0].line === initial.line) {
                        return false; // already in stack trace
                    } else if (!stackInfo.stack[0].line && stackInfo.stack[0].func === initial.func) {
                        stackInfo.stack[0].line = initial.line;
                        stackInfo.stack[0].context = initial.context;
                        return false;
                    }
                }
            }

            stackInfo.stack.unshift(initial);
            stackInfo.partial = true;
            return true;
        } else {
            stackInfo.incomplete = true;
        }

        return false;
    }
function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {
        var initial = {
            'url': url,
            'line': lineNo
        };

        if (initial.url && initial.line) {
            stackInfo.incomplete = false;

            if (!initial.func) {
                initial.func = guessFunctionName(initial.url, initial.line);
            }

            if (!initial.context) {
                initial.context = gatherContext(initial.url, initial.line);
            }

            var reference = / '([^']+)' /.exec(message);
            if (reference) {
                initial.column = findSourceInLine(reference[1], initial.url, initial.line);
            }

            if (stackInfo.stack.length > 0) {
                if (stackInfo.stack[0].url === initial.url) {
                    if (stackInfo.stack[0].line === initial.line) {
                        return false; // already in stack trace
                    } else if (!stackInfo.stack[0].line && stackInfo.stack[0].func === initial.func) {
                        stackInfo.stack[0].line = initial.line;
                        stackInfo.stack[0].context = initial.context;
                        return false;
                    }
                }
            }

            stackInfo.stack.unshift(initial);
            stackInfo.partial = true;
            return true;
        } else {
            stackInfo.incomplete = true;
        }

        return false;
    }
function augmentStackTraceWithInitialElement ( stackInfo , url , lineNo , message ) { var initial = { 'url' : url , 'line' : lineNo } ; if ( initial . url && initial . line ) { stackInfo . incomplete = false ; if ( ! initial . func ) { initial . func = guessFunctionName ( initial . url , initial . line ) ; } if ( ! initial . context ) { initial . context = gatherContext ( initial . url , initial . line ) ; } var reference = /  '([^']+)'  / . exec ( message ) ; if ( reference ) { initial . column = findSourceInLine ( reference [ 1 ] , initial . url , initial . line ) ; } if ( stackInfo . stack . length > 0 ) { if ( stackInfo . stack [ 0 ] . url === initial . url ) { if ( stackInfo . stack [ 0 ] . line === initial . line ) { return false ; // already in stack trace } else if ( ! stackInfo . stack [ 0 ] . line && stackInfo . stack [ 0 ] . func === initial . func ) { stackInfo . stack [ 0 ] . line = initial . line ; stackInfo . stack [ 0 ] . context = initial . context ; return false ; } } } stackInfo . stack . unshift ( initial ) ; stackInfo . partial = true ; return true ; } else { stackInfo . incomplete = true ; } return false ; }
Adds information about the first frame to incomplete stack traces.
Safari and IE require this to get complete data on the first frame.
@param {Object.<string, *>} stackInfo Stack trace information from
one of the compute* methods.
@param {string} url The URL of the script that caused an error.
@param {(number|string)} lineNo The line number of the script that
caused an error.
@param {string=} message The error generated by the browser, which
hopefully contains the name of the object that caused the error.
@return {boolean} Whether or not the stack information was
augmented.
Adds information about the first frame to incomplete stack traces . Safari and IE require this to get complete data on the first frame .