js/src/tests/test262/ch12/12.1/S12.1_A2.js

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     1 // Copyright 2009 the Sputnik authors.  All rights reserved.
     2 // This code is governed by the BSD license found in the LICENSE file.
     4 /**
     5  * The production StatementList  Statement is evaluated as follows
     6  * 1. Evaluate Statement.
     7  * 2. If an exception was thrown, return (throw, V, empty) where V is the exception
     8  *
     9  * @path ch12/12.1/S12.1_A2.js
    10  * @description Throwing exception within a Block
    11  */
    13 //////////////////////////////////////////////////////////////////////////////
    14 //CHECK#1
    15 try {
    16 	x();
    17 	$ERROR('#1: "x()" lead to throwing exception');
    18 } catch (e) {
    19 	$PRINT(e.message);
    20 }
    21 //
    22 //////////////////////////////////////////////////////////////////////////////
    24 //////////////////////////////////////////////////////////////////////////////
    25 //CHECK#2
    26 try {
    27     throw "catchme";	
    28     $ERROR('#2: throw "catchme" lead to throwing exception');
    29 } catch (e) {
    30 	if (e!=="catchme") {
    31 		$ERROR('#2.1: Exception === "catchme". Actual:  Exception ==='+ e  );
    32 	}
    33 }
    35 //
    36 //////////////////////////////////////////////////////////////////////////////

mercurial