dist/exceptionless.universal.js
function computeStackTraceFromStacktraceProp(ex) {
        // Access and store the stacktrace property before doing ANYTHING
        // else to it because Opera is not very good at providing it
        // reliably in other circumstances.
        var stacktrace = ex.stacktrace;
        if (!stacktrace) {
            return;
        }

        var opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,
            opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,
            lines = stacktrace.split('\n'),
            stack = [],
            parts;

        for (var line = 0; line < lines.length; line += 2) {
            var element = null;
            if ((parts = opera10Regex.exec(lines[line]))) {
                element = {
                    'url': parts[2],
                    'line': +parts[1],
                    'column': null,
                    'func': parts[3],
                    'args':[]
                };
            } else if ((parts = opera11Regex.exec(lines[line]))) {
                element = {
                    'url': parts[6],
                    'line': +parts[1],
                    'column': +parts[2],
                    'func': parts[3] || parts[4],
                    'args': parts[5] ? parts[5].split(',') : []
                };
            }

            if (element) {
                if (!element.func && element.line) {
                    element.func = guessFunctionName(element.url, element.line);
                }
                if (element.line) {
                    try {
                        element.context = gatherContext(element.url, element.line);
                    } catch (exc) {}
                }

                if (!element.context) {
                    element.context = [lines[line + 1]];
                }

                stack.push(element);
            }
        }

        if (!stack.length) {
            return null;
        }

        return {
            'mode': 'stacktrace',
            'name': ex.name,
            'message': ex.message,
            'stack': stack
        };
    }
function computeStackTraceFromStacktraceProp(ex) {
        // Access and store the stacktrace property before doing ANYTHING
        // else to it because Opera is not very good at providing it
        // reliably in other circumstances.
        var stacktrace = ex.stacktrace;
        if (!stacktrace) {
            return;
        }

        var opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,
            opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,
            lines = stacktrace.split('\n'),
            stack = [],
            parts;

        for (var line = 0; line < lines.length; line += 2) {
            var element = null;
            if ((parts = opera10Regex.exec(lines[line]))) {
                element = {
                    'url': parts[2],
                    'line': +parts[1],
                    'column': null,
                    'func': parts[3],
                    'args':[]
                };
            } else if ((parts = opera11Regex.exec(lines[line]))) {
                element = {
                    'url': parts[6],
                    'line': +parts[1],
                    'column': +parts[2],
                    'func': parts[3] || parts[4],
                    'args': parts[5] ? parts[5].split(',') : []
                };
            }

            if (element) {
                if (!element.func && element.line) {
                    element.func = guessFunctionName(element.url, element.line);
                }
                if (element.line) {
                    try {
                        element.context = gatherContext(element.url, element.line);
                    } catch (exc) {}
                }

                if (!element.context) {
                    element.context = [lines[line + 1]];
                }

                stack.push(element);
            }
        }

        if (!stack.length) {
            return null;
        }

        return {
            'mode': 'stacktrace',
            'name': ex.name,
            'message': ex.message,
            'stack': stack
        };
    }
function computeStackTraceFromStacktraceProp ( ex ) { // Access and store the stacktrace property before doing ANYTHING // else to it because Opera is not very good at providing it // reliably in other circumstances. var stacktrace = ex . stacktrace ; if ( ! stacktrace ) { return ; } var opera10Regex = /  line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$ / i , opera11Regex = /  line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$ / i , lines = stacktrace . split ( '\n' ) , stack = [ ] , parts ; for ( var line = 0 ; line < lines . length ; line += 2 ) { var element = null ; if ( ( parts = opera10Regex . exec ( lines [ line ] ) ) ) { element = { 'url' : parts [ 2 ] , 'line' : + parts [ 1 ] , 'column' : null , 'func' : parts [ 3 ] , 'args' : [ ] } ; } else if ( ( parts = opera11Regex . exec ( lines [ line ] ) ) ) { element = { 'url' : parts [ 6 ] , 'line' : + parts [ 1 ] , 'column' : + parts [ 2 ] , 'func' : parts [ 3 ] || parts [ 4 ] , 'args' : parts [ 5 ] ? parts [ 5 ] . split ( ',' ) : [ ] } ; } if ( element ) { if ( ! element . func && element . line ) { element . func = guessFunctionName ( element . url , element . line ) ; } if ( element . line ) { try { element . context = gatherContext ( element . url , element . line ) ; } catch ( exc ) { } } if ( ! element . context ) { element . context = [ lines [ line + 1 ] ] ; } stack . push ( element ) ; } } if ( ! stack . length ) { return null ; } return { 'mode' : 'stacktrace' , 'name' : ex . name , 'message' : ex . message , 'stack' : stack } ; }
Computes stack trace information from the stacktrace property.
Opera 10+ uses this property.
@param {Error} ex
@return {?TraceKit.StackTrace} Stack trace information.
@memberof TraceKit.computeStackTrace
Computes stack trace information from the stacktrace property . Opera 10 + uses this property .