]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/ecma_2/Exceptions/exception-009.js
JavaScriptCore-576.tar.gz
[apple/javascriptcore.git] / tests / mozilla / ecma_2 / Exceptions / exception-009.js
1 /**
2 * File Name: exception-009
3 * ECMA Section:
4 * Description: Tests for JavaScript Standard Exceptions
5 *
6 * Regression test for nested try blocks.
7 *
8 * http://scopus.mcom.com/bugsplat/show_bug.cgi?id=312964
9 *
10 * Author: christine@netscape.com
11 * Date: 31 August 1998
12 */
13 var SECTION = "exception-009";
14 var VERSION = "JS1_4";
15 var TITLE = "Tests for JavaScript Standard Exceptions: SyntaxError";
16 var BUGNUMBER= "312964";
17
18 startTest();
19 writeHeaderToLog( SECTION + " "+ TITLE);
20
21 var tc = 0;
22 var testcases = new Array();
23
24 try {
25 expect = "passed: no exception thrown";
26 result = expect;
27 Nested_1();
28 } catch ( e ) {
29 result = "failed: threw " + e;
30 } finally {
31 testcases[tc++] = new TestCase(
32 SECTION,
33 "nested try",
34 expect,
35 result );
36 }
37
38
39 test();
40
41 function Nested_1() {
42 try {
43 try {
44 } catch (a) {
45 } finally {
46 }
47 } catch (b) {
48 } finally {
49 }
50 }