diff options
Diffstat (limited to 'test/script/basic/NASHORN-837.js')
-rw-r--r-- | test/script/basic/NASHORN-837.js | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/test/script/basic/NASHORN-837.js b/test/script/basic/NASHORN-837.js index 0632fb39..ef9ec64d 100644 --- a/test/script/basic/NASHORN-837.js +++ b/test/script/basic/NASHORN-837.js @@ -28,23 +28,13 @@ * @run */ -var failed = false; - try { - try { - throw new TypeError('error'); - } catch (iox) { - function f() { - print(iox.message); - } + throw new TypeError('error'); +} catch (iox) { + var f = function() { + if(iox.message != 'error') { + print("Failure! iox did not throw correct exception"); + } } - f(); -} catch (e) { - failed = (e instanceof ReferenceError); - //iox not defined should be thrown -} - -if (!failed) { - print("Failure! iox did not throw correct exception"); } - +f(); |