|
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/. */ |
|
5 |
|
6 |
|
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"; |
|
23 |
|
24 startTest(); |
|
25 writeHeaderToLog( SECTION + " "+ TITLE); |
|
26 |
|
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 } |
|
40 |
|
41 |
|
42 test(); |
|
43 |
|
44 function Nested_1() { |
|
45 try { |
|
46 try { |
|
47 } catch (a) { |
|
48 } finally { |
|
49 } |
|
50 } catch (b) { |
|
51 } finally { |
|
52 } |
|
53 } |