diff --git a/source/Ox/js/Core.js b/source/Ox/js/Core.js index bd4c3739..c24da952 100644 --- a/source/Ox/js/Core.js +++ b/source/Ox/js/Core.js @@ -273,6 +273,18 @@ Ox.print = function() { return args.join(' '); }; +Ox.trace = function() { + var args = Ox.slice(arguments); + try { + throw new Error() + } catch (e) { + if (e.stack) { + args.push('\n' + e.stack.split('\n').slice(2).join('\n')); + } + } + Ox.print.apply(null, args); +}; + /*@ Ox.uid Returns a unique id () -> Unique id