src/stacktrace.js
function _parserPhantomJS(error){
		// start parse the error stack string
		var lines	= error.stack.split("\n").slice(1);
		var stacktrace	= [];
		lines.forEach(function(line){
			if( line.match(/\(native\)$/) ){
				var matches	= line.match(/^\s*at (.+) \(native\)/);
				stacktrace.push(new Stacktrace.Frame({
					fct	: matches[1],
					url	: 'native',
					line	: 1,
					column	: 1
				}));
			}else if( line.match(/\)$/) ){
				var matches	= line.match(/^\s*at (.+) \((.+):(\d+)\)/);
				stacktrace.push(new Stacktrace.Frame({
					fct	: matches[1],
					url	: matches[2],
					line	: parseInt(matches[3], 10),
					column	: 1
				}));
			}else{
				var matches	= line.match(/^\s*at (.+):(\d+)/);
				stacktrace.push(new Stacktrace.Frame({
					url	: matches[1],
					fct	: '<anonymous>',
					line	: parseInt(matches[2], 10),
					column	: 1
				}));
			}
		});
		return stacktrace;
	}
function _parserPhantomJS(error){
		// start parse the error stack string
		var lines	= error.stack.split("\n").slice(1);
		var stacktrace	= [];
		lines.forEach(function(line){
			if( line.match(/\(native\)$/) ){
				var matches	= line.match(/^\s*at (.+) \(native\)/);
				stacktrace.push(new Stacktrace.Frame({
					fct	: matches[1],
					url	: 'native',
					line	: 1,
					column	: 1
				}));
			}else if( line.match(/\)$/) ){
				var matches	= line.match(/^\s*at (.+) \((.+):(\d+)\)/);
				stacktrace.push(new Stacktrace.Frame({
					fct	: matches[1],
					url	: matches[2],
					line	: parseInt(matches[3], 10),
					column	: 1
				}));
			}else{
				var matches	= line.match(/^\s*at (.+):(\d+)/);
				stacktrace.push(new Stacktrace.Frame({
					url	: matches[1],
					fct	: '<anonymous>',
					line	: parseInt(matches[2], 10),
					column	: 1
				}));
			}
		});
		return stacktrace;
	}
function _parserPhantomJS ( error ) { // start parse the error stack string var lines = error . stack . split ( "\n" ) . slice ( 1 ) ; var stacktrace = [ ] ; lines . forEach ( function ( line ) { if ( line . match ( / \(native\)$ / ) ) { var matches = line . match ( / ^\s*at (.+) \(native\) / ) ; stacktrace . push ( new Stacktrace . Frame ( { fct : matches [ 1 ] , url : 'native' , line : 1 , column : 1 } ) ) ; } else if ( line . match ( / \)$ / ) ) { var matches = line . match ( / ^\s*at (.+) \((.+):(\d+)\) / ) ; stacktrace . push ( new Stacktrace . Frame ( { fct : matches [ 1 ] , url : matches [ 2 ] , line : parseInt ( matches [ 3 ] , 10 ) , column : 1 } ) ) ; } else { var matches = line . match ( / ^\s*at (.+):(\d+) / ) ; stacktrace . push ( new Stacktrace . Frame ( { url : matches [ 1 ] , fct : '<anonymous>' , line : parseInt ( matches [ 2 ] , 10 ) , column : 1 } ) ) ; } } ) ; return stacktrace ; }
parse the stacktrace from phantomJS
parse the stacktrace from phantomJS