x64StackWalkLoopBody.js 806 B

123456789101112131415161718192021222324252627
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. if (this.WScript && this.WScript.LoadScriptFile) {
  6. this.WScript.LoadScriptFile("TrimStackTracePath.js");
  7. }
  8. function bar(a)
  9. {
  10. for(var i = 0; i<4; i++)
  11. {
  12. for(var j = 0; j<4; j++)
  13. {
  14. try
  15. {
  16. baz();
  17. }
  18. catch(ex)
  19. {
  20. WScript.Echo(TrimStackTracePath(ex.stack));
  21. }
  22. }
  23. }
  24. }
  25. bar(1);