JsDiagBreakOnUncaughtException.js 727 B

1234567891011121314151617181920
  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. /**exception(uncaught):stack();**/
  6. function noThrowFunction() {
  7. try {
  8. throw new Error("throw exception from noThrowFunction");
  9. } catch (err) {
  10. }
  11. }
  12. noThrowFunction();
  13. // calling throwFunction() will terminate program, so this has to come last
  14. function throwFunction() {
  15. throw new Error("throw exception from throwFunction");
  16. }
  17. throwFunction();