js/src/tests/ecma_2/Exceptions/exception-009.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 /**
     8  *  File Name:          exception-009
     9  *  ECMA Section:
    10  *  Description:        Tests for JavaScript Standard Exceptions
    11  *
    12  *  Regression test for nested try blocks.
    13  *
    14  *  http://scopus.mcom.com/bugsplat/show_bug.cgi?id=312964
    15  *
    16  *  Author:             christine@netscape.com
    17  *  Date:               31 August 1998
    18  */
    19 var SECTION = "exception-009";
    20 var VERSION = "JS1_4";
    21 var TITLE   = "Tests for JavaScript Standard Exceptions: SyntaxError";
    22 var BUGNUMBER= "312964";
    24 startTest();
    25 writeHeaderToLog( SECTION + " "+ TITLE);
    27 try {
    28   expect = "passed:  no exception thrown";
    29   result = expect;
    30   Nested_1();
    31 } catch ( e ) {
    32   result = "failed: threw " + e;
    33 } finally {
    34   new TestCase(
    35     SECTION,
    36     "nested try",
    37     expect,
    38     result );
    39 }
    42 test();
    44 function Nested_1() {
    45   try {
    46     try {
    47     } catch (a) {
    48     } finally {
    49     }
    50   } catch (b) {
    51   } finally {
    52   }
    53 }

mercurial