linenumber1.js 707 B

123456789101112131415161718192021
  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("../UnitTestFramework/TrimStackTracePath.js");
  7. }
  8. function f() { return 42; }
  9. function main()
  10. {
  11. try {
  12. var i = 0;
  13. return f() - p0;
  14. } catch (e) {
  15. console.log(TrimStackTracePath(e.stack));
  16. }
  17. }
  18. main();