| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
var gTestfile = 'catchguard-002-n.js'; |
| 8 |
|
| 9 |
DESCRIPTION = "var in catch clause should have caused an error."; |
| 10 |
EXPECTED = "error"; |
| 11 |
|
| 12 |
var expect; |
| 13 |
var actual; |
| 14 |
|
| 15 |
test(); |
| 16 |
|
| 17 |
function test() |
| 18 |
{ |
| 19 |
enterFunc ("test"); |
| 20 |
|
| 21 |
var EXCEPTION_DATA = "String exception"; |
| 22 |
var e; |
| 23 |
|
| 24 |
printStatus ("Catchguard var declaration negative test."); |
| 25 |
|
| 26 |
try |
| 27 |
{ |
| 28 |
throw EXCEPTION_DATA; |
| 29 |
} |
| 30 |
catch (var e) |
| 31 |
{ |
| 32 |
actual = e + ''; |
| 33 |
} |
| 34 |
|
| 35 |
reportCompare(expect, actual, DESCRIPTION); |
| 36 |
|
| 37 |
exitFunc ("test"); |
| 38 |
} |