src/js/libs/spiritual-gui.js
function(message) {
		var stack, e = new Error(
			gui.GreatSpirit.DENIAL + (message ? ": " + message : "")
		);
		if (!gui.Client.isExplorer && (stack = e.stack)) {
			if (gui.Client.isWebKit) {
				stack = stack.replace(/^[^\(]+?[\n$]/gm, "").
				replace(/^\s+at\s+/gm, "").
				replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@").
				split("\n");
			} else {
				stack = stack.split("\n");
			}
			stack.shift();
			stack.shift(); // @TODO: shift one more now?
			console.warn(e.message + "\n" + stack);
		} else {
			console.warn(e.message);
		}
	}
function(message) {
		var stack, e = new Error(
			gui.GreatSpirit.DENIAL + (message ? ": " + message : "")
		);
		if (!gui.Client.isExplorer && (stack = e.stack)) {
			if (gui.Client.isWebKit) {
				stack = stack.replace(/^[^\(]+?[\n$]/gm, "").
				replace(/^\s+at\s+/gm, "").
				replace(/^Object.<anonymous>\s*\(/gm, "{anonymous}()@").
				split("\n");
			} else {
				stack = stack.split("\n");
			}
			stack.shift();
			stack.shift(); // @TODO: shift one more now?
			console.warn(e.message + "\n" + stack);
		} else {
			console.warn(e.message);
		}
	}
function ( message ) { var stack , e = new Error ( gui . GreatSpirit . DENIAL + ( message ? ": " + message : "" ) ) ; if ( ! gui . Client . isExplorer && ( stack = e . stack ) ) { if ( gui . Client . isWebKit ) { stack = stack . replace ( / ^[^\(]+?[\n$] / gm , "" ) . replace ( / ^\s+at\s+ / gm , "" ) . replace ( / ^Object.<anonymous>\s*\( / gm , "{anonymous}()@" ) . split ( "\n" ) ; } else { stack = stack . split ( "\n" ) ; } stack . shift ( ) ; stack . shift ( ) ; // @TODO: shift one more now? console . warn ( e . message + "\n" + stack ) ; } else { console . warn ( e . message ) ; } }
Obscure mechanism to include the whole stacktrace in the error message
because some kind of Selenium WebDriver can't print stack traces...
@see https://gist.github.com/jay3sh/1158940
@param @optional {String} message
Obscure mechanism to include the whole stacktrace in the error message because some kind of Selenium WebDriver can t print stack traces ...