trycatch_stackfunc.js 653 B

123456789101112131415161718192021222324
  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. function test(param)
  6. {
  7. var nested = function() { return param; }
  8. try
  9. {
  10. var inner = function() { return nested(); }
  11. WScript.Echo(inner());
  12. }
  13. catch (e)
  14. {
  15. }
  16. WScript.Echo(inner());
  17. }
  18. test("test1");
  19. test("test2");