src/stacktrace.js
function(e) {
        var stack = e.stacktrace;
        var lines = stack.split('\n'), ANON = '{anonymous}', lineRE = /.*line (\d+), column (\d+) in ((<anonymous function\:?\s*(\S+))|([^\(]+)\([^\)]*\))(?: in )?(.*)\s*$/i, i, j, len;
        for (i = 2, j = 0, len = lines.length; i < len - 2; i++) {
            if (lineRE.test(lines[i])) {
                var location = RegExp.$6 + ':' + RegExp.$1 + ':' + RegExp.$2;
                var fnName = RegExp.$3;
                fnName = fnName.replace(/<anonymous function\:?\s?(\S+)?>/g, ANON);
                lines[j++] = fnName + '@' + location;
            }
        }

        lines.splice(j, lines.length - j);
        return lines;
    }
function(e) {
        var stack = e.stacktrace;
        var lines = stack.split('\n'), ANON = '{anonymous}', lineRE = /.*line (\d+), column (\d+) in ((<anonymous function\:?\s*(\S+))|([^\(]+)\([^\)]*\))(?: in )?(.*)\s*$/i, i, j, len;
        for (i = 2, j = 0, len = lines.length; i < len - 2; i++) {
            if (lineRE.test(lines[i])) {
                var location = RegExp.$6 + ':' + RegExp.$1 + ':' + RegExp.$2;
                var fnName = RegExp.$3;
                fnName = fnName.replace(/<anonymous function\:?\s?(\S+)?>/g, ANON);
                lines[j++] = fnName + '@' + location;
            }
        }

        lines.splice(j, lines.length - j);
        return lines;
    }
function ( e ) { var stack = e . stacktrace ; var lines = stack . split ( '\n' ) , ANON = '{anonymous}' , lineRE = / .*line (\d+), column (\d+) in ((<anonymous function\:?\s*(\S+))|([^\(]+)\([^\)]*\))(?: in )?(.*)\s*$ / i , i , j , len ; for ( i = 2 , j = 0 , len = lines . length ; i < len - 2 ; i ++ ) { if ( lineRE . test ( lines [ i ] ) ) { var location = RegExp . $6 + ':' + RegExp . $1 + ':' + RegExp . $2 ; var fnName = RegExp . $3 ; fnName = fnName . replace ( / <anonymous function\:?\s?(\S+)?> / g , ANON ) ; lines [ j ++ ] = fnName + '@' + location ; } } lines . splice ( j , lines . length - j ) ; return lines ; }
Given an Error object, return a formatted Array based on Opera 10's stacktrace string.

@param e - Error object to inspect
@return Array<String> of function calls, files and line numbers
Given an Error object return a formatted Array based on Opera 10 s stacktrace string .