x64StackWalk.js 747 B

12345678910111213141516171819202122232425
  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 foo(a)
  9. {
  10. try{
  11. baz();
  12. }catch(ex){
  13. WScript.Echo(TrimStackTracePath(ex.stack));
  14. }
  15. try{
  16. baz();
  17. }catch(ex){
  18. WScript.Echo(TrimStackTracePath(ex.stack));
  19. }
  20. }
  21. foo(1);
  22. foo(1);
  23. foo(1.1);