1. Embeb stacktrace.js file before the end of the head tag.
<script src="./stacktrace.js"></script>2. Then, you can get an array everywhere whatever(whenever) u wnat. it named ErrorTrace.
alert(ErrorTrace.join('\n\n'));3. if a url is specific, the error will automaticlly sent to the url using a post method.