Debian Codegraph @

js/src/tests/non262/Exceptions/regress-58946.js

raw
1 /* -*- indent-tabs-mode: nil; js-indent-level: 4 -*-
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 var BUGNUMBER = '58946';
8 var stat = 'Testing a return statement inside a catch statement inside a function';
9
10 test();
11
12 function test() {
13 printBugNumber(BUGNUMBER);
14 printStatus (stat);
15
16 expect = 'PASS';
17
18 function f()
19 {
20 try
21 {
22 throw 'PASS';
23 }
24 catch(e)
25 {
26 return e;
27 }
28 }
29
30 actual = f();
31
32 reportCompare(expect, actual, stat);
33 }