From 4a125f2f4e16d47bf10eb1bf6693ba2124d597f1 Mon Sep 17 00:00:00 2001
From: rwaldron <waldron.rick@gmail.com>
Date: Thu, 22 Jul 2021 15:58:54 -0400
Subject: [PATCH] chore: migrate $ERROR -> throw new Test262Error in
 test/language/s*

---
 test/language/source-text/6.1.js              |  6 +-
 test/language/statements/block/S12.1_A2.js    |  4 +-
 test/language/statements/block/S12.1_A5.js    | 12 ++--
 test/language/statements/break/S12.8_A3.js    |  2 +-
 test/language/statements/break/S12.8_A4_T1.js |  2 +-
 test/language/statements/break/S12.8_A4_T2.js |  2 +-
 test/language/statements/break/S12.8_A4_T3.js |  2 +-
 test/language/statements/break/S12.8_A7.js    |  4 +-
 test/language/statements/break/S12.8_A9_T1.js |  2 +-
 test/language/statements/break/S12.8_A9_T2.js |  2 +-
 .../class/definition/prototype-setter.js      |  2 +-
 .../default-constructor-spread-override.js    |  2 +-
 ...superclass-prototype-setter-constructor.js |  2 +-
 ...rclass-prototype-setter-method-override.js |  2 +-
 .../superclass-static-method-override.js      |  2 +-
 test/language/statements/continue/S12.7_A7.js |  4 +-
 .../statements/continue/S12.7_A9_T1.js        |  2 +-
 .../statements/continue/S12.7_A9_T2.js        |  2 +-
 .../statements/do-while/S12.6.1_A1.js         |  6 +-
 .../statements/do-while/S12.6.1_A10.js        |  2 +-
 .../statements/do-while/S12.6.1_A11.js        |  2 +-
 .../statements/do-while/S12.6.1_A14_T1.js     |  2 +-
 .../statements/do-while/S12.6.1_A14_T2.js     |  2 +-
 .../statements/do-while/S12.6.1_A2.js         |  4 +-
 .../statements/do-while/S12.6.1_A3.js         |  4 +-
 .../statements/do-while/S12.6.1_A4_T1.js      |  4 +-
 .../statements/do-while/S12.6.1_A4_T2.js      |  2 +-
 .../statements/do-while/S12.6.1_A4_T3.js      |  2 +-
 .../statements/do-while/S12.6.1_A4_T4.js      |  2 +-
 .../statements/do-while/S12.6.1_A5.js         |  6 +-
 .../statements/do-while/S12.6.1_A7.js         |  4 +-
 .../statements/do-while/S12.6.1_A8.js         |  4 +-
 .../statements/do-while/S12.6.1_A9.js         |  4 +-
 .../statements/expression/S12.4_A2_T1.js      |  4 +-
 .../statements/expression/S12.4_A2_T2.js      |  4 +-
 test/language/statements/for-in/S12.6.4_A1.js |  4 +-
 .../statements/for-in/S12.6.4_A14_T2.js       |  2 +-
 test/language/statements/for-in/S12.6.4_A2.js |  4 +-
 .../statements/for-in/S12.6.4_A3.1.js         |  4 +-
 test/language/statements/for-in/S12.6.4_A3.js |  4 +-
 .../statements/for-in/S12.6.4_A4.1.js         |  4 +-
 test/language/statements/for-in/S12.6.4_A4.js |  4 +-
 .../statements/for-in/S12.6.4_A5.1.js         |  2 +-
 test/language/statements/for-in/S12.6.4_A5.js |  2 +-
 .../statements/for-in/S12.6.4_A6.1.js         |  4 +-
 test/language/statements/for-in/S12.6.4_A6.js |  4 +-
 .../statements/for-in/S12.6.4_A7_T1.js        |  4 +-
 .../statements/for-in/S12.6.4_A7_T2.js        |  4 +-
 .../statements/for-of/break-from-catch.js     |  6 +-
 .../statements/for-of/break-from-finally.js   |  6 +-
 .../statements/for-of/break-from-try.js       |  6 +-
 .../for-of/break-label-from-catch.js          |  8 +--
 .../for-of/break-label-from-finally.js        |  8 +--
 .../statements/for-of/break-label-from-try.js |  8 +--
 .../language/statements/for-of/break-label.js |  6 +-
 test/language/statements/for-of/break.js      |  4 +-
 .../statements/for-of/continue-from-catch.js  |  4 +-
 .../for-of/continue-from-finally.js           |  4 +-
 .../statements/for-of/continue-from-try.js    |  4 +-
 .../for-of/continue-label-from-catch.js       |  6 +-
 .../for-of/continue-label-from-finally.js     |  6 +-
 .../for-of/continue-label-from-try.js         |  6 +-
 .../statements/for-of/continue-label.js       |  4 +-
 test/language/statements/for-of/continue.js   |  2 +-
 .../for-of/generator-close-via-break.js       |  4 +-
 .../for-of/generator-close-via-continue.js    |  4 +-
 .../for-of/generator-close-via-return.js      |  4 +-
 .../for-of/generator-close-via-throw.js       |  4 +-
 .../for-of/iterator-next-result-type.js       |  6 +-
 .../statements/for-of/return-from-catch.js    |  8 +--
 .../statements/for-of/return-from-finally.js  |  8 +--
 .../statements/for-of/return-from-try.js      | 10 ++--
 test/language/statements/for-of/return.js     |  6 +-
 .../statements/for-of/throw-from-catch.js     |  8 +--
 .../statements/for-of/throw-from-finally.js   |  8 +--
 test/language/statements/for-of/throw.js      |  6 +-
 .../statements/for-of/yield-from-catch.js     |  2 +-
 .../for-of/yield-star-from-catch.js           |  2 +-
 test/language/statements/for/S12.6.3_A1.js    |  4 +-
 .../statements/for/S12.6.3_A10.1_T1.js        | 16 ++---
 .../statements/for/S12.6.3_A10.1_T2.js        | 16 ++---
 .../language/statements/for/S12.6.3_A10_T1.js |  4 +-
 .../language/statements/for/S12.6.3_A10_T2.js |  4 +-
 .../statements/for/S12.6.3_A11.1_T1.js        |  2 +-
 .../statements/for/S12.6.3_A11.1_T2.js        |  6 +-
 .../language/statements/for/S12.6.3_A11_T1.js |  2 +-
 .../language/statements/for/S12.6.3_A11_T2.js |  6 +-
 .../statements/for/S12.6.3_A12.1_T1.js        |  2 +-
 .../statements/for/S12.6.3_A12.1_T2.js        |  6 +-
 .../language/statements/for/S12.6.3_A12_T1.js |  2 +-
 .../language/statements/for/S12.6.3_A12_T2.js |  6 +-
 test/language/statements/for/S12.6.3_A13.js   |  2 +-
 test/language/statements/for/S12.6.3_A14.js   | 18 +++---
 test/language/statements/for/S12.6.3_A15.js   |  4 +-
 test/language/statements/for/S12.6.3_A2.1.js  |  4 +-
 test/language/statements/for/S12.6.3_A2.2.js  |  4 +-
 test/language/statements/for/S12.6.3_A2.js    |  6 +-
 test/language/statements/for/S12.6.3_A3.js    |  8 +--
 test/language/statements/for/S12.6.3_A5.js    |  6 +-
 test/language/statements/for/S12.6.3_A6.js    |  6 +-
 .../statements/function/S10.1.1_A1_T1.js      |  2 +-
 .../statements/function/S13.2.1_A4_T1.js      |  2 +-
 .../statements/function/S13.2.1_A4_T2.js      |  2 +-
 .../statements/function/S13.2.1_A4_T3.js      |  2 +-
 .../statements/function/S13.2.1_A4_T4.js      |  2 +-
 .../statements/function/S13.2.1_A5_T1.js      |  2 +-
 .../statements/function/S13.2.1_A5_T2.js      |  2 +-
 .../statements/function/S13.2.1_A6_T1.js      |  2 +-
 .../statements/function/S13.2.1_A6_T2.js      |  2 +-
 .../statements/function/S13.2.1_A6_T3.js      |  2 +-
 .../statements/function/S13.2.1_A6_T4.js      |  2 +-
 .../statements/function/S13.2.1_A7_T1.js      |  2 +-
 .../statements/function/S13.2.1_A7_T2.js      |  2 +-
 .../statements/function/S13.2.1_A7_T3.js      |  8 +--
 .../statements/function/S13.2.1_A7_T4.js      |  8 +--
 .../statements/function/S13.2.1_A8_T1.js      |  4 +-
 .../statements/function/S13.2.1_A8_T2.js      |  4 +-
 .../statements/function/S13.2.1_A9.1_T1.js    |  4 +-
 .../statements/function/S13.2.1_A9.1_T2.js    |  4 +-
 .../statements/function/S13.2.1_A9_T1.js      |  4 +-
 .../statements/function/S13.2.1_A9_T2.js      |  4 +-
 .../statements/function/S13.2.2_A10.js        |  4 +-
 .../statements/function/S13.2.2_A11.js        |  2 +-
 .../statements/function/S13.2.2_A12.js        |  4 +-
 .../statements/function/S13.2.2_A13.js        |  2 +-
 .../statements/function/S13.2.2_A14.js        |  2 +-
 .../statements/function/S13.2.2_A15_T1.js     |  6 +-
 .../statements/function/S13.2.2_A15_T2.js     |  6 +-
 .../statements/function/S13.2.2_A15_T3.js     |  6 +-
 .../statements/function/S13.2.2_A15_T4.js     |  6 +-
 .../statements/function/S13.2.2_A16_T1.js     |  6 +-
 .../statements/function/S13.2.2_A16_T2.js     |  6 +-
 .../statements/function/S13.2.2_A16_T3.js     |  8 +--
 .../statements/function/S13.2.2_A17_T2.js     | 10 ++--
 .../statements/function/S13.2.2_A17_T3.js     | 10 ++--
 .../statements/function/S13.2.2_A18_T1.js     |  8 +--
 .../statements/function/S13.2.2_A18_T2.js     |  8 +--
 .../statements/function/S13.2.2_A19_T1.js     |  2 +-
 .../statements/function/S13.2.2_A19_T2.js     |  2 +-
 .../statements/function/S13.2.2_A19_T3.js     |  2 +-
 .../statements/function/S13.2.2_A19_T4.js     |  2 +-
 .../statements/function/S13.2.2_A19_T5.js     |  2 +-
 .../statements/function/S13.2.2_A19_T6.js     |  2 +-
 .../statements/function/S13.2.2_A19_T7.js     |  8 +--
 .../statements/function/S13.2.2_A19_T8.js     |  8 +--
 .../statements/function/S13.2.2_A1_T1.js      |  6 +-
 .../statements/function/S13.2.2_A1_T2.js      |  6 +-
 .../statements/function/S13.2.2_A2.js         |  6 +-
 .../statements/function/S13.2.2_A3_T1.js      |  4 +-
 .../statements/function/S13.2.2_A3_T2.js      |  4 +-
 .../statements/function/S13.2.2_A4_T1.js      |  4 +-
 .../statements/function/S13.2.2_A4_T2.js      |  4 +-
 .../statements/function/S13.2.2_A5_T1.js      | 12 ++--
 .../statements/function/S13.2.2_A5_T2.js      | 12 ++--
 .../statements/function/S13.2.2_A6_T1.js      |  4 +-
 .../statements/function/S13.2.2_A6_T2.js      |  4 +-
 .../statements/function/S13.2.2_A7_T1.js      |  4 +-
 .../statements/function/S13.2.2_A7_T2.js      |  4 +-
 .../statements/function/S13.2.2_A8_T1.js      |  6 +-
 .../statements/function/S13.2.2_A8_T2.js      |  6 +-
 .../statements/function/S13.2.2_A8_T3.js      |  6 +-
 .../statements/function/S13.2.2_A9.js         |  2 +-
 .../statements/function/S13.2_A1_T1.js        |  2 +-
 .../statements/function/S13.2_A1_T2.js        |  2 +-
 .../statements/function/S13.2_A2_T1.js        |  2 +-
 .../statements/function/S13.2_A2_T2.js        |  2 +-
 test/language/statements/function/S13.2_A3.js |  4 +-
 .../statements/function/S13.2_A4_T1.js        |  6 +-
 .../statements/function/S13.2_A4_T2.js        |  6 +-
 test/language/statements/function/S13.2_A5.js |  4 +-
 test/language/statements/function/S13_A1.js   |  4 +-
 test/language/statements/function/S13_A10.js  |  4 +-
 .../statements/function/S13_A11_T1.js         |  2 +-
 .../statements/function/S13_A11_T2.js         |  2 +-
 .../statements/function/S13_A11_T3.js         |  2 +-
 .../statements/function/S13_A11_T4.js         |  2 +-
 .../statements/function/S13_A12_T1.js         |  4 +-
 .../statements/function/S13_A12_T2.js         |  4 +-
 .../statements/function/S13_A13_T1.js         |  4 +-
 .../statements/function/S13_A13_T2.js         |  4 +-
 .../statements/function/S13_A13_T3.js         |  6 +-
 .../statements/function/S13_A14_T1.js         |  2 +-
 .../statements/function/S13_A15_T1.js         |  2 +-
 .../statements/function/S13_A15_T2.js         |  2 +-
 .../statements/function/S13_A15_T3.js         |  4 +-
 .../statements/function/S13_A15_T4.js         |  2 +-
 .../statements/function/S13_A15_T5.js         |  4 +-
 .../statements/function/S13_A17_T1.js         |  8 +--
 .../statements/function/S13_A17_T2.js         |  8 +--
 test/language/statements/function/S13_A18.js  |  4 +-
 .../statements/function/S13_A19_T1.js         |  4 +-
 .../statements/function/S13_A19_T2.js         |  4 +-
 .../language/statements/function/S13_A2_T1.js |  4 +-
 .../language/statements/function/S13_A2_T2.js |  4 +-
 .../language/statements/function/S13_A2_T3.js |  4 +-
 .../language/statements/function/S13_A3_T1.js |  2 +-
 .../language/statements/function/S13_A3_T2.js |  2 +-
 .../language/statements/function/S13_A3_T3.js |  2 +-
 .../language/statements/function/S13_A4_T1.js |  4 +-
 .../language/statements/function/S13_A4_T2.js |  4 +-
 .../language/statements/function/S13_A4_T3.js |  4 +-
 .../language/statements/function/S13_A4_T4.js |  8 +--
 .../language/statements/function/S13_A6_T1.js |  4 +-
 .../language/statements/function/S13_A6_T2.js |  6 +-
 .../language/statements/function/S13_A7_T1.js | 14 ++---
 .../language/statements/function/S13_A8_T1.js |  4 +-
 .../language/statements/function/S13_A8_T2.js |  6 +-
 test/language/statements/function/S13_A9.js   |  2 +-
 test/language/statements/function/S14_A2.js   |  4 +-
 test/language/statements/function/S14_A3.js   |  4 +-
 .../language/statements/function/S14_A5_T1.js |  2 +-
 .../language/statements/function/S14_A5_T2.js |  2 +-
 .../statements/function/name-unicode.js       |  2 +-
 test/language/statements/if/S12.5_A1.1_T1.js  | 12 ++--
 test/language/statements/if/S12.5_A1.1_T2.js  | 24 ++++----
 test/language/statements/if/S12.5_A1.2_T1.js  | 18 +++---
 test/language/statements/if/S12.5_A1.2_T2.js  | 36 +++++------
 test/language/statements/if/S12.5_A10_T1.js   |  2 +-
 test/language/statements/if/S12.5_A10_T2.js   |  2 +-
 test/language/statements/if/S12.5_A12_T1.js   | 24 ++++----
 test/language/statements/if/S12.5_A12_T2.js   | 12 ++--
 test/language/statements/if/S12.5_A12_T3.js   | 12 ++--
 test/language/statements/if/S12.5_A12_T4.js   |  8 +--
 test/language/statements/if/S12.5_A1_T1.js    |  8 +--
 test/language/statements/if/S12.5_A1_T2.js    | 16 ++---
 test/language/statements/if/S12.5_A2.js       |  2 +-
 test/language/statements/if/S12.5_A3.js       |  4 +-
 test/language/statements/if/S12.5_A4.js       |  8 +--
 test/language/statements/if/S12.5_A5.js       |  6 +-
 .../statements/labeled/S12.12_A1_T1.js        |  2 +-
 test/language/statements/return/S12.9_A3.js   |  2 +-
 test/language/statements/return/S12.9_A4.js   |  2 +-
 test/language/statements/return/S12.9_A5.js   |  6 +-
 .../statements/switch/S12.11_A1_T1.js         | 20 +++----
 .../statements/switch/S12.11_A1_T2.js         | 22 +++----
 .../statements/switch/S12.11_A1_T3.js         | 24 ++++----
 .../statements/switch/S12.11_A1_T4.js         | 18 +++---
 .../statements/switch/S12.11_A4_T1.js         |  2 +-
 .../language/statements/throw/S12.13_A2_T1.js |  2 +-
 .../language/statements/throw/S12.13_A2_T2.js |  2 +-
 .../language/statements/throw/S12.13_A2_T3.js |  8 +--
 .../language/statements/throw/S12.13_A2_T4.js |  4 +-
 .../language/statements/throw/S12.13_A2_T5.js | 14 ++---
 .../language/statements/throw/S12.13_A2_T6.js |  8 +--
 .../language/statements/throw/S12.13_A2_T7.js |  2 +-
 .../language/statements/throw/S12.13_A3_T1.js |  8 +--
 .../language/statements/throw/S12.13_A3_T2.js |  4 +-
 .../language/statements/throw/S12.13_A3_T3.js | 20 +++----
 .../language/statements/throw/S12.13_A3_T4.js | 10 ++--
 .../language/statements/throw/S12.13_A3_T5.js |  2 +-
 .../language/statements/throw/S12.13_A3_T6.js |  8 +--
 test/language/statements/try/S12.14_A1.js     | 12 ++--
 test/language/statements/try/S12.14_A10_T1.js |  2 +-
 test/language/statements/try/S12.14_A10_T2.js | 14 ++---
 test/language/statements/try/S12.14_A10_T3.js | 24 ++++----
 test/language/statements/try/S12.14_A10_T4.js |  8 +--
 test/language/statements/try/S12.14_A10_T5.js |  8 +--
 test/language/statements/try/S12.14_A11_T1.js |  2 +-
 test/language/statements/try/S12.14_A11_T2.js | 18 +++---
 test/language/statements/try/S12.14_A11_T3.js | 24 ++++----
 test/language/statements/try/S12.14_A11_T4.js |  8 +--
 test/language/statements/try/S12.14_A12_T1.js |  2 +-
 test/language/statements/try/S12.14_A12_T2.js | 20 +++----
 test/language/statements/try/S12.14_A12_T3.js | 24 ++++----
 test/language/statements/try/S12.14_A12_T4.js |  8 +--
 test/language/statements/try/S12.14_A13_T1.js | 14 ++---
 test/language/statements/try/S12.14_A13_T2.js | 34 +++++------
 test/language/statements/try/S12.14_A13_T3.js | 44 +++++++-------
 test/language/statements/try/S12.14_A14.js    | 14 ++---
 test/language/statements/try/S12.14_A15.js    | 20 +++----
 test/language/statements/try/S12.14_A17.js    |  4 +-
 test/language/statements/try/S12.14_A18_T1.js |  2 +-
 test/language/statements/try/S12.14_A18_T2.js |  2 +-
 test/language/statements/try/S12.14_A18_T3.js | 12 ++--
 test/language/statements/try/S12.14_A18_T4.js |  8 +--
 test/language/statements/try/S12.14_A18_T5.js | 20 +++----
 test/language/statements/try/S12.14_A18_T6.js | 10 ++--
 test/language/statements/try/S12.14_A18_T7.js | 12 ++--
 test/language/statements/try/S12.14_A19_T1.js | 14 ++---
 test/language/statements/try/S12.14_A19_T2.js | 28 ++++-----
 test/language/statements/try/S12.14_A2.js     | 12 ++--
 test/language/statements/try/S12.14_A3.js     | 12 ++--
 test/language/statements/try/S12.14_A4.js     | 10 ++--
 test/language/statements/try/S12.14_A5.js     | 14 ++---
 test/language/statements/try/S12.14_A6.js     | 10 ++--
 test/language/statements/try/S12.14_A7_T1.js  | 50 ++++++++--------
 test/language/statements/try/S12.14_A7_T2.js  | 36 +++++------
 test/language/statements/try/S12.14_A7_T3.js  | 60 +++++++++----------
 test/language/statements/try/S12.14_A8.js     | 10 ++--
 test/language/statements/try/S12.14_A9_T1.js  |  2 +-
 test/language/statements/try/S12.14_A9_T2.js  | 14 ++---
 test/language/statements/try/S12.14_A9_T3.js  | 24 ++++----
 test/language/statements/try/S12.14_A9_T4.js  |  8 +--
 test/language/statements/try/S12.14_A9_T5.js  |  8 +--
 test/language/statements/variable/S12.2_A1.js |  6 +-
 .../language/statements/variable/S12.2_A10.js |  2 +-
 .../language/statements/variable/S12.2_A11.js |  4 +-
 .../language/statements/variable/S12.2_A12.js |  2 +-
 test/language/statements/variable/S12.2_A2.js |  8 +--
 test/language/statements/variable/S12.2_A3.js |  8 +--
 test/language/statements/variable/S12.2_A4.js |  4 +-
 test/language/statements/variable/S12.2_A5.js |  2 +-
 .../statements/variable/S12.2_A6_T1.js        |  4 +-
 .../statements/variable/S12.2_A6_T2.js        |  2 +-
 test/language/statements/variable/S12.2_A7.js |  2 +-
 test/language/statements/variable/S12.2_A9.js |  2 +-
 test/language/statements/variable/S14_A1.js   |  4 +-
 test/language/statements/while/S12.6.2_A1.js  | 10 ++--
 test/language/statements/while/S12.6.2_A10.js |  2 +-
 test/language/statements/while/S12.6.2_A11.js |  2 +-
 .../statements/while/S12.6.2_A14_T1.js        |  2 +-
 .../statements/while/S12.6.2_A14_T2.js        |  2 +-
 test/language/statements/while/S12.6.2_A2.js  |  6 +-
 test/language/statements/while/S12.6.2_A3.js  |  4 +-
 .../statements/while/S12.6.2_A4_T1.js         |  4 +-
 .../statements/while/S12.6.2_A4_T2.js         |  2 +-
 .../statements/while/S12.6.2_A4_T3.js         |  2 +-
 .../statements/while/S12.6.2_A4_T4.js         |  2 +-
 test/language/statements/while/S12.6.2_A5.js  |  6 +-
 test/language/statements/while/S12.6.2_A7.js  |  4 +-
 test/language/statements/while/S12.6.2_A8.js  |  4 +-
 test/language/statements/while/S12.6.2_A9.js  |  4 +-
 test/language/statements/with/12.10-2-4.js    |  4 +-
 test/language/statements/with/12.10-2-5.js    |  4 +-
 .../statements/with/S12.10_A1.10_T1.js        | 38 ++++++------
 .../statements/with/S12.10_A1.10_T2.js        | 40 ++++++-------
 .../statements/with/S12.10_A1.10_T3.js        | 40 ++++++-------
 .../statements/with/S12.10_A1.10_T4.js        | 38 ++++++------
 .../statements/with/S12.10_A1.10_T5.js        | 38 ++++++------
 .../statements/with/S12.10_A1.11_T1.js        | 36 +++++------
 .../statements/with/S12.10_A1.11_T2.js        | 38 ++++++------
 .../statements/with/S12.10_A1.11_T3.js        | 40 ++++++-------
 .../statements/with/S12.10_A1.11_T4.js        | 38 ++++++------
 .../statements/with/S12.10_A1.11_T5.js        | 40 ++++++-------
 .../statements/with/S12.10_A1.12_T1.js        | 38 ++++++------
 .../statements/with/S12.10_A1.12_T2.js        | 40 ++++++-------
 .../statements/with/S12.10_A1.12_T3.js        | 40 ++++++-------
 .../statements/with/S12.10_A1.12_T4.js        | 40 ++++++-------
 .../statements/with/S12.10_A1.12_T5.js        | 40 ++++++-------
 .../statements/with/S12.10_A1.1_T1.js         | 38 ++++++------
 .../statements/with/S12.10_A1.1_T2.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.1_T3.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.2_T1.js         | 38 ++++++------
 .../statements/with/S12.10_A1.2_T2.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.2_T3.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.2_T4.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.2_T5.js         | 38 ++++++------
 .../statements/with/S12.10_A1.3_T1.js         | 38 ++++++------
 .../statements/with/S12.10_A1.3_T2.js         | 38 ++++++------
 .../statements/with/S12.10_A1.3_T3.js         | 38 ++++++------
 .../statements/with/S12.10_A1.3_T4.js         | 38 ++++++------
 .../statements/with/S12.10_A1.3_T5.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.4_T1.js         | 38 ++++++------
 .../statements/with/S12.10_A1.4_T2.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.4_T3.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.4_T4.js         | 38 ++++++------
 .../statements/with/S12.10_A1.4_T5.js         | 38 ++++++------
 .../statements/with/S12.10_A1.5_T1.js         | 38 ++++++------
 .../statements/with/S12.10_A1.5_T2.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.5_T3.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.5_T4.js         | 38 ++++++------
 .../statements/with/S12.10_A1.5_T5.js         | 38 ++++++------
 .../statements/with/S12.10_A1.6_T1.js         | 38 ++++++------
 .../statements/with/S12.10_A1.6_T2.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.6_T3.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.7_T1.js         | 38 ++++++------
 .../statements/with/S12.10_A1.7_T2.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.7_T3.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.7_T4.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.7_T5.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.8_T1.js         | 38 ++++++------
 .../statements/with/S12.10_A1.8_T2.js         | 38 ++++++------
 .../statements/with/S12.10_A1.8_T3.js         | 38 ++++++------
 .../statements/with/S12.10_A1.8_T4.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.8_T5.js         | 40 ++++++-------
 .../statements/with/S12.10_A1.9_T1.js         | 38 ++++++------
 .../statements/with/S12.10_A1.9_T2.js         | 38 ++++++------
 .../statements/with/S12.10_A1.9_T3.js         | 38 ++++++------
 .../statements/with/S12.10_A3.10_T1.js        |  4 +-
 .../statements/with/S12.10_A3.10_T2.js        |  6 +-
 .../statements/with/S12.10_A3.10_T3.js        |  6 +-
 .../statements/with/S12.10_A3.10_T4.js        |  4 +-
 .../statements/with/S12.10_A3.10_T5.js        |  4 +-
 .../statements/with/S12.10_A3.11_T1.js        |  4 +-
 .../statements/with/S12.10_A3.11_T2.js        |  6 +-
 .../statements/with/S12.10_A3.11_T3.js        |  6 +-
 .../statements/with/S12.10_A3.11_T4.js        |  6 +-
 .../statements/with/S12.10_A3.11_T5.js        |  6 +-
 .../statements/with/S12.10_A3.12_T1.js        |  4 +-
 .../statements/with/S12.10_A3.12_T2.js        |  6 +-
 .../statements/with/S12.10_A3.12_T3.js        |  6 +-
 .../statements/with/S12.10_A3.12_T4.js        |  6 +-
 .../statements/with/S12.10_A3.12_T5.js        |  6 +-
 .../statements/with/S12.10_A3.1_T1.js         |  4 +-
 .../statements/with/S12.10_A3.1_T2.js         |  6 +-
 .../statements/with/S12.10_A3.1_T3.js         |  6 +-
 .../statements/with/S12.10_A3.2_T1.js         |  4 +-
 .../statements/with/S12.10_A3.2_T2.js         |  4 +-
 .../statements/with/S12.10_A3.2_T3.js         |  4 +-
 .../statements/with/S12.10_A3.2_T4.js         |  6 +-
 .../statements/with/S12.10_A3.2_T5.js         |  6 +-
 .../statements/with/S12.10_A3.3_T1.js         |  4 +-
 .../statements/with/S12.10_A3.3_T2.js         |  4 +-
 .../statements/with/S12.10_A3.3_T3.js         |  4 +-
 .../statements/with/S12.10_A3.3_T4.js         |  6 +-
 .../statements/with/S12.10_A3.4_T1.js         |  4 +-
 .../statements/with/S12.10_A3.4_T2.js         |  6 +-
 .../statements/with/S12.10_A3.4_T3.js         |  6 +-
 .../statements/with/S12.10_A3.4_T4.js         |  4 +-
 .../statements/with/S12.10_A3.4_T5.js         |  4 +-
 .../statements/with/S12.10_A3.5_T1.js         |  4 +-
 .../statements/with/S12.10_A3.5_T2.js         |  6 +-
 .../statements/with/S12.10_A3.5_T3.js         |  6 +-
 .../statements/with/S12.10_A3.5_T4.js         |  4 +-
 .../statements/with/S12.10_A3.5_T5.js         |  4 +-
 .../statements/with/S12.10_A3.6_T1.js         |  6 +-
 .../statements/with/S12.10_A3.6_T2.js         |  6 +-
 .../statements/with/S12.10_A3.6_T3.js         |  6 +-
 .../statements/with/S12.10_A3.7_T1.js         |  4 +-
 .../statements/with/S12.10_A3.7_T2.js         |  6 +-
 .../statements/with/S12.10_A3.7_T3.js         |  6 +-
 .../statements/with/S12.10_A3.7_T4.js         |  6 +-
 .../statements/with/S12.10_A3.7_T5.js         |  6 +-
 .../statements/with/S12.10_A3.8_T1.js         |  4 +-
 .../statements/with/S12.10_A3.8_T2.js         |  4 +-
 .../statements/with/S12.10_A3.8_T3.js         |  4 +-
 .../statements/with/S12.10_A3.8_T4.js         |  6 +-
 .../statements/with/S12.10_A3.8_T5.js         |  6 +-
 .../statements/with/S12.10_A3.9_T1.js         |  4 +-
 .../statements/with/S12.10_A3.9_T2.js         |  4 +-
 .../statements/with/S12.10_A3.9_T3.js         |  4 +-
 test/language/statements/with/S12.10_A4_T1.js |  4 +-
 test/language/statements/with/S12.10_A4_T2.js |  4 +-
 test/language/statements/with/S12.10_A4_T3.js |  4 +-
 test/language/statements/with/S12.10_A4_T4.js |  6 +-
 test/language/statements/with/S12.10_A4_T5.js |  4 +-
 test/language/statements/with/S12.10_A4_T6.js |  4 +-
 test/language/statements/with/S12.10_A5_T1.js |  8 +--
 test/language/statements/with/S12.10_A5_T2.js |  8 +--
 test/language/statements/with/S12.10_A5_T3.js |  8 +--
 test/language/statements/with/S12.10_A5_T4.js | 10 ++--
 test/language/statements/with/S12.10_A5_T5.js | 10 ++--
 test/language/statements/with/S12.10_A5_T6.js | 10 ++--
 443 files changed, 2286 insertions(+), 2286 deletions(-)

diff --git a/test/language/source-text/6.1.js b/test/language/source-text/6.1.js
index 91090b5558..f56e26f5b3 100644
--- a/test/language/source-text/6.1.js
+++ b/test/language/source-text/6.1.js
@@ -8,12 +8,12 @@ description: Test for handling of supplementary characters
 
 var chars = "𐒠";  // Single Unicode character at codepoint \u{104A0}
 if(chars.length !== 2) {
-    $ERROR("A character outside the BMP (Unicode CodePoint > 0xFFFF) should consume two code units");
+    throw new Test262Error("A character outside the BMP (Unicode CodePoint > 0xFFFF) should consume two code units");
 }
 if(chars.charCodeAt(0) !== 0xD801) {
-    $ERROR("First code unit of surrogate pair for 0x104A0 should be 0xD801");
+    throw new Test262Error("First code unit of surrogate pair for 0x104A0 should be 0xD801");
 }
 
 if(chars.charCodeAt(1) !== 0xDCA0) {
-    $ERROR("Second code unit of surrogate pair for 0x104A0 should be 0xDCA0");
+    throw new Test262Error("Second code unit of surrogate pair for 0x104A0 should be 0xDCA0");
 }
diff --git a/test/language/statements/block/S12.1_A2.js b/test/language/statements/block/S12.1_A2.js
index 1b324d3abf..3189f0f72c 100644
--- a/test/language/statements/block/S12.1_A2.js
+++ b/test/language/statements/block/S12.1_A2.js
@@ -25,10 +25,10 @@ assert.throws(ReferenceError, function() {
 //CHECK#2
 try {
     throw "catchme";	
-    $ERROR('#2: throw "catchme" lead to throwing exception');
+    throw new Test262Error('#2: throw "catchme" lead to throwing exception');
 } catch (e) {
 	if (e!=="catchme") {
-		$ERROR('#2.1: Exception === "catchme". Actual:  Exception ==='+ e  );
+		throw new Test262Error('#2.1: Exception === "catchme". Actual:  Exception ==='+ e  );
 	}
 }
 
diff --git a/test/language/statements/block/S12.1_A5.js b/test/language/statements/block/S12.1_A5.js
index 495ef34250..09a16042dc 100644
--- a/test/language/statements/block/S12.1_A5.js
+++ b/test/language/statements/block/S12.1_A5.js
@@ -15,10 +15,10 @@ try {
 	throw 1;
     throw 2;
     throw 3;
-    $ERROR('1.1: throw 1 lead to throwing exception');
+    throw new Test262Error('1.1: throw 1 lead to throwing exception');
 } catch (e) {
 	if (e!==1) {
-		$ERROR('#1.2: Exception === 1. Actual:  Exception ==='+ e);
+		throw new Test262Error('#1.2: Exception === 1. Actual:  Exception ==='+ e);
 	}
 }
 ////////////////////////////////////////////////////////////////////////////////
@@ -31,10 +31,10 @@ try {
         throw 2;
     }
     throw 3;
-    $ERROR('#2.1: throw 1 lead to throwing exception');
+    throw new Test262Error('#2.1: throw 1 lead to throwing exception');
 } catch (e) {
 	if (e!==1) {
-		$ERROR('#2.2: Exception === 1. Actual:  Exception ==='+ e);
+		throw new Test262Error('#2.2: Exception === 1. Actual:  Exception ==='+ e);
 	}
 }
 ////////////////////////////////////////////////////////////////////////////////
@@ -47,10 +47,10 @@ try {
         throw 2;
         throw 3;
     }
-    $ERROR('#3.1: throw 1 lead to throwing exception');
+    throw new Test262Error('#3.1: throw 1 lead to throwing exception');
 } catch (e) {
 	if (e!==1) {
-		$ERROR('#3.2: Exception === 1. Actual:  Exception ==='+ e);
+		throw new Test262Error('#3.2: Exception === 1. Actual:  Exception ==='+ e);
 	}
 }
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/break/S12.8_A3.js b/test/language/statements/break/S12.8_A3.js
index ad15b083dc..013f246e34 100644
--- a/test/language/statements/break/S12.8_A3.js
+++ b/test/language/statements/break/S12.8_A3.js
@@ -26,7 +26,7 @@ function OUT_FUNC(){}
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if ((x!==2)&&(y!==0)) {
-	$ERROR('#1: x === 2 and y === 0. Actual:  x ==='+x+' and y ==='+y);
+	throw new Test262Error('#1: x === 2 and y === 0. Actual:  x ==='+x+' and y ==='+y);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/break/S12.8_A4_T1.js b/test/language/statements/break/S12.8_A4_T1.js
index 279167a124..9a3d6104b6 100644
--- a/test/language/statements/break/S12.8_A4_T1.js
+++ b/test/language/statements/break/S12.8_A4_T1.js
@@ -29,7 +29,7 @@ function OUT_FUNC(){}
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if ((x!==1)&&(y!==0)) {
-	$ERROR('#1: x === 1 and y === 0. Actual:  x === '+x+' and y ==='+ y  );
+	throw new Test262Error('#1: x === 1 and y === 0. Actual:  x === '+x+' and y ==='+ y  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/break/S12.8_A4_T2.js b/test/language/statements/break/S12.8_A4_T2.js
index 7e4ad79428..778445eae0 100644
--- a/test/language/statements/break/S12.8_A4_T2.js
+++ b/test/language/statements/break/S12.8_A4_T2.js
@@ -35,7 +35,7 @@ function OUT_FUNC(){}
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if ((x!==1)&&(y!==1)&&(xx!==1)&(yy!==0)) {
-	$ERROR('#1: x === 1 and y === 1 and xx === 1 and yy === 0. Actual:  x==='+x+' and y==='+y+' and xx==='+xx+' and yy==='+yy );
+	throw new Test262Error('#1: x === 1 and y === 1 and xx === 1 and yy === 0. Actual:  x==='+x+' and y==='+y+' and xx==='+xx+' and yy==='+yy );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/break/S12.8_A4_T3.js b/test/language/statements/break/S12.8_A4_T3.js
index 20d12de254..367be3962d 100644
--- a/test/language/statements/break/S12.8_A4_T3.js
+++ b/test/language/statements/break/S12.8_A4_T3.js
@@ -35,7 +35,7 @@ function OUT_FUNC(){}
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if ((x!==1)&&(y!==0)&&(xx!==1)&(yy!==0)) {
-	$ERROR('#1: x === 1 and y === 0 and xx === 1 and yy === 0. Actual:  x==='+x+' and y==='+y+' and xx==='+xx+' and yy==='+yy );
+	throw new Test262Error('#1: x === 1 and y === 0 and xx === 1 and yy === 0. Actual:  x==='+x+' and y==='+y+' and xx==='+xx+' and yy==='+yy );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/break/S12.8_A7.js b/test/language/statements/break/S12.8_A7.js
index 31bfd10174..f01a8cb6b9 100644
--- a/test/language/statements/break/S12.8_A7.js
+++ b/test/language/statements/break/S12.8_A7.js
@@ -19,10 +19,10 @@ try{
         eval("break LABEL1");
         y++;
     } while(0);
-	$ERROR('#1: eval("break LABEL1") does not lead to throwing exception');
+	throw new Test262Error('#1: eval("break LABEL1") does not lead to throwing exception');
 } catch(e){
 	if(!(e instanceof SyntaxError)){
-		$ERROR("1.1: Appearing of break within eval statement inside of IterationStatement yields SyntaxError");
+		throw new Test262Error("1.1: Appearing of break within eval statement inside of IterationStatement yields SyntaxError");
 	}
 }
 //
diff --git a/test/language/statements/break/S12.8_A9_T1.js b/test/language/statements/break/S12.8_A9_T1.js
index 2bc393c897..d56dd09d22 100644
--- a/test/language/statements/break/S12.8_A9_T1.js
+++ b/test/language/statements/break/S12.8_A9_T1.js
@@ -26,7 +26,7 @@ FOR : for(;;){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (x!==1) {
-	$ERROR('#1: break inside of try-catch nested in loop is allowed');
+	throw new Test262Error('#1: break inside of try-catch nested in loop is allowed');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/break/S12.8_A9_T2.js b/test/language/statements/break/S12.8_A9_T2.js
index 1c2012eea9..afcd19507c 100644
--- a/test/language/statements/break/S12.8_A9_T2.js
+++ b/test/language/statements/break/S12.8_A9_T2.js
@@ -26,7 +26,7 @@ FOR : for(;;){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (x!==1) {
-	$ERROR('#1: break inside of try-catch nested in loop is allowed');
+	throw new Test262Error('#1: break inside of try-catch nested in loop is allowed');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/class/definition/prototype-setter.js b/test/language/statements/class/definition/prototype-setter.js
index 8b42329407..75b895b933 100644
--- a/test/language/statements/class/definition/prototype-setter.js
+++ b/test/language/statements/class/definition/prototype-setter.js
@@ -8,7 +8,7 @@ description: >
 var Base = function() {}.bind();
 Object.defineProperty(Base, 'prototype', {
   set: function() {
-    $ERROR("Cannot create a setter property named `prototype`");
+    throw new Test262Error("Cannot create a setter property named `prototype`");
   }
 });
 assert.throws(TypeError, function() {
diff --git a/test/language/statements/class/subclass/default-constructor-spread-override.js b/test/language/statements/class/subclass/default-constructor-spread-override.js
index 679deaed34..a4152bb856 100644
--- a/test/language/statements/class/subclass/default-constructor-spread-override.js
+++ b/test/language/statements/class/subclass/default-constructor-spread-override.js
@@ -9,7 +9,7 @@ features: [Symbol.iterator]
 ---*/
 
 Array.prototype[Symbol.iterator] = function() {
-  $ERROR('@@iterator invoked');
+  throw new Test262Error('@@iterator invoked');
 };
 
 class Base {
diff --git a/test/language/statements/class/subclass/superclass-prototype-setter-constructor.js b/test/language/statements/class/subclass/superclass-prototype-setter-constructor.js
index 5cec0fea1d..ef9d3f3bb6 100644
--- a/test/language/statements/class/subclass/superclass-prototype-setter-constructor.js
+++ b/test/language/statements/class/subclass/superclass-prototype-setter-constructor.js
@@ -9,7 +9,7 @@ function Base() {}
 
 Base.prototype = {
   set constructor(_) {
-    $ERROR("`Base.prototype.constructor` is unreachable.");
+    throw new Test262Error("`Base.prototype.constructor` is unreachable.");
   }
 };
 
diff --git a/test/language/statements/class/subclass/superclass-prototype-setter-method-override.js b/test/language/statements/class/subclass/superclass-prototype-setter-method-override.js
index 3e12668783..6c796a4cf0 100644
--- a/test/language/statements/class/subclass/superclass-prototype-setter-method-override.js
+++ b/test/language/statements/class/subclass/superclass-prototype-setter-method-override.js
@@ -9,7 +9,7 @@ function Base() {}
 
 Base.prototype = {
   set m(_) {
-    $ERROR("`Base.prototype.m` is unreachable.");
+    throw new Test262Error("`Base.prototype.m` is unreachable.");
   }
 };
 
diff --git a/test/language/statements/class/subclass/superclass-static-method-override.js b/test/language/statements/class/subclass/superclass-static-method-override.js
index 24d7c7466d..327d1c14e3 100644
--- a/test/language/statements/class/subclass/superclass-static-method-override.js
+++ b/test/language/statements/class/subclass/superclass-static-method-override.js
@@ -8,7 +8,7 @@ description: >
 function Base() {}
 Object.defineProperty(Base, 'staticM', {
   set: function() {
-    $ERROR("`Base.staticM` is unreachable.");
+    throw new Test262Error("`Base.staticM` is unreachable.");
   }
 });
 
diff --git a/test/language/statements/continue/S12.7_A7.js b/test/language/statements/continue/S12.7_A7.js
index a32db4a295..1304c09f3c 100644
--- a/test/language/statements/continue/S12.7_A7.js
+++ b/test/language/statements/continue/S12.7_A7.js
@@ -19,10 +19,10 @@ try{
         eval("continue LABEL1");
         y++;
     } while(0);
-	$ERROR('#1: eval("continue LABEL1") does not lead to throwing exception');
+	throw new Test262Error('#1: eval("continue LABEL1") does not lead to throwing exception');
 } catch(e){
 	if(!(e instanceof SyntaxError)){
-		$ERROR("1.1: Appearing of continue within eval statement inside of IterationStatement yields SyntaxError");
+		throw new Test262Error("1.1: Appearing of continue within eval statement inside of IterationStatement yields SyntaxError");
 	}
 }
 //
diff --git a/test/language/statements/continue/S12.7_A9_T1.js b/test/language/statements/continue/S12.7_A9_T1.js
index 173897070d..d042263b4b 100644
--- a/test/language/statements/continue/S12.7_A9_T1.js
+++ b/test/language/statements/continue/S12.7_A9_T1.js
@@ -26,7 +26,7 @@ FOR : for(;;){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (x!==10) {
-	$ERROR('#1: Continue inside of try-catch nested in loop is allowed');
+	throw new Test262Error('#1: Continue inside of try-catch nested in loop is allowed');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/continue/S12.7_A9_T2.js b/test/language/statements/continue/S12.7_A9_T2.js
index 8ea11d3eac..b0570478f4 100644
--- a/test/language/statements/continue/S12.7_A9_T2.js
+++ b/test/language/statements/continue/S12.7_A9_T2.js
@@ -24,7 +24,7 @@ FOR : for(;;){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (x!==10) {
-	$ERROR('#1: Continue inside of try-catch nested in loop is allowed');
+	throw new Test262Error('#1: Continue inside of try-catch nested in loop is allowed');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/do-while/S12.6.1_A1.js b/test/language/statements/do-while/S12.6.1_A1.js
index f81387b10d..9b99877186 100644
--- a/test/language/statements/do-while/S12.6.1_A1.js
+++ b/test/language/statements/do-while/S12.6.1_A1.js
@@ -16,7 +16,7 @@ do __in__do=1; while ( false );
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__in__do!==1) {
-	$ERROR('#1: the inner statement of a do-loop should be evaluated before the expression: false evaluates to false');
+	throw new Test262Error('#1: the inner statement of a do-loop should be evaluated before the expression: false evaluates to false');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -26,7 +26,7 @@ do __in__do=2; while ( 0 );
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__in__do!==2) {
-	$ERROR('#2: the inner statement of a do-loop should be evaluated before the expression: 0 evaluates to false');
+	throw new Test262Error('#2: the inner statement of a do-loop should be evaluated before the expression: 0 evaluates to false');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -36,7 +36,7 @@ do __in__do=3; while ( "" );
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__in__do!==3) {
-	$ERROR('#3: the inner statement of a do-loop should be evaluated before the expression: "" evaluates to false');
+	throw new Test262Error('#3: the inner statement of a do-loop should be evaluated before the expression: "" evaluates to false');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/do-while/S12.6.1_A10.js b/test/language/statements/do-while/S12.6.1_A10.js
index 17f586b264..12eef9916e 100644
--- a/test/language/statements/do-while/S12.6.1_A10.js
+++ b/test/language/statements/do-while/S12.6.1_A10.js
@@ -23,7 +23,7 @@ do {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (check !== 1) {
-	$ERROR('#1: FunctionExpression within a "do-while" statement is allowed, but no function with the given name will appear in the global context');
+	throw new Test262Error('#1: FunctionExpression within a "do-while" statement is allowed, but no function with the given name will appear in the global context');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/do-while/S12.6.1_A11.js b/test/language/statements/do-while/S12.6.1_A11.js
index 4df1d76e85..487088b68c 100644
--- a/test/language/statements/do-while/S12.6.1_A11.js
+++ b/test/language/statements/do-while/S12.6.1_A11.js
@@ -15,7 +15,7 @@ do {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__in__do !== 1) {
-	$ERROR('#1: "{}" in do-while expression evaluates to true');
+	throw new Test262Error('#1: "{}" in do-while expression evaluates to true');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/do-while/S12.6.1_A14_T1.js b/test/language/statements/do-while/S12.6.1_A14_T1.js
index c3b7b6b390..b6e7fc6e39 100644
--- a/test/language/statements/do-while/S12.6.1_A14_T1.js
+++ b/test/language/statements/do-while/S12.6.1_A14_T1.js
@@ -21,7 +21,7 @@ do{
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__reached !== 1) {
-	$ERROR('#2: function expession inside of do-while expression is allowed');
+	throw new Test262Error('#2: function expession inside of do-while expression is allowed');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/do-while/S12.6.1_A14_T2.js b/test/language/statements/do-while/S12.6.1_A14_T2.js
index b3b8e9922b..32fb5004f3 100644
--- a/test/language/statements/do-while/S12.6.1_A14_T2.js
+++ b/test/language/statements/do-while/S12.6.1_A14_T2.js
@@ -21,7 +21,7 @@ do{
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__reached !== 1) {
-	$ERROR('#2: function expession inside of do-while expression is allowed');
+	throw new Test262Error('#2: function expession inside of do-while expression is allowed');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/do-while/S12.6.1_A2.js b/test/language/statements/do-while/S12.6.1_A2.js
index 1a28eb6fd0..1455b2c734 100644
--- a/test/language/statements/do-while/S12.6.1_A2.js
+++ b/test/language/statements/do-while/S12.6.1_A2.js
@@ -13,7 +13,7 @@ var __in__do;
 
 try {
 	do __in__do = "reached"; while (abbracadabra);
-	$ERROR('#1: \'do __in__do = "reached"; while (abbracadabra)\' lead to throwing exception');
+	throw new Test262Error('#1: \'do __in__do = "reached"; while (abbracadabra)\' lead to throwing exception');
 } catch (e) {
     if (e instanceof Test262Error) throw e;
 }
@@ -21,7 +21,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__in__do !== "reached") {
-	$ERROR('#1.1: __in__do === "reached". Actual:  __in__do ==='+ __in__do  );
+	throw new Test262Error('#1.1: __in__do === "reached". Actual:  __in__do ==='+ __in__do  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/do-while/S12.6.1_A3.js b/test/language/statements/do-while/S12.6.1_A3.js
index 80b78b9811..907056a286 100644
--- a/test/language/statements/do-while/S12.6.1_A3.js
+++ b/test/language/statements/do-while/S12.6.1_A3.js
@@ -16,7 +16,7 @@ __evaluated = eval("do __in__do=1; while (false)");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#
 if (__in__do !== 1) {
-	$ERROR('#1: __in__do === 1. Actual:  __in__do ==='+ __in__do  );
+	throw new Test262Error('#1: __in__do === 1. Actual:  __in__do ==='+ __in__do  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -24,7 +24,7 @@ if (__in__do !== 1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__evaluated !== 1) {
-	$ERROR('#2: __evaluated === 1. Actual:  __evaluated ==='+ __evaluated  );
+	throw new Test262Error('#2: __evaluated === 1. Actual:  __evaluated ==='+ __evaluated  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/do-while/S12.6.1_A4_T1.js b/test/language/statements/do-while/S12.6.1_A4_T1.js
index 7852207501..e269df9ad4 100644
--- a/test/language/statements/do-while/S12.6.1_A4_T1.js
+++ b/test/language/statements/do-while/S12.6.1_A4_T1.js
@@ -20,7 +20,7 @@ do {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__in__do__before__break !== "reached") {
-	$ERROR('#1: __in__do__before__break === "reached". Actual:  __in__do__before__break ==='+ __in__do__before__break  );
+	throw new Test262Error('#1: __in__do__before__break === "reached". Actual:  __in__do__before__break ==='+ __in__do__before__break  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -28,7 +28,7 @@ if (__in__do__before__break !== "reached") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (typeof __in__do__after__break !== "undefined") {
-	$ERROR('#2: typeof __in__do__after__break === "undefined". Actual:  typeof __in__do__after__break ==='+ typeof __in__do__after__break  );
+	throw new Test262Error('#2: typeof __in__do__after__break === "undefined". Actual:  typeof __in__do__after__break ==='+ typeof __in__do__after__break  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/do-while/S12.6.1_A4_T2.js b/test/language/statements/do-while/S12.6.1_A4_T2.js
index b5f926c80a..c819afca7b 100644
--- a/test/language/statements/do-while/S12.6.1_A4_T2.js
+++ b/test/language/statements/do-while/S12.6.1_A4_T2.js
@@ -22,7 +22,7 @@ do_out : do {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)) {
-	$ERROR('#1: (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)===true. Actual:  (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)==='+ (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break) );
+	throw new Test262Error('#1: (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)===true. Actual:  (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)==='+ (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break) );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/do-while/S12.6.1_A4_T3.js b/test/language/statements/do-while/S12.6.1_A4_T3.js
index 3d20b8fd44..a162b32220 100644
--- a/test/language/statements/do-while/S12.6.1_A4_T3.js
+++ b/test/language/statements/do-while/S12.6.1_A4_T3.js
@@ -22,7 +22,7 @@ do_out : do {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&!__in__do__after__break)) {
-	$ERROR('#1: (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&!__in__do__after__break)===true. Actual:  (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&!__in__do__after__break)==='+ (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&!__in__do__after__break) );
+	throw new Test262Error('#1: (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&!__in__do__after__break)===true. Actual:  (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&!__in__do__after__break)==='+ (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&!__in__do__after__break) );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/do-while/S12.6.1_A4_T4.js b/test/language/statements/do-while/S12.6.1_A4_T4.js
index 2efaa692c6..be044b14d4 100644
--- a/test/language/statements/do-while/S12.6.1_A4_T4.js
+++ b/test/language/statements/do-while/S12.6.1_A4_T4.js
@@ -22,7 +22,7 @@ do_out : do {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)) {
-	$ERROR('#1: (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)===true. Actual:  (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)==='+ (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break) );
+	throw new Test262Error('#1: (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)===true. Actual:  (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)==='+ (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break) );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/do-while/S12.6.1_A5.js b/test/language/statements/do-while/S12.6.1_A5.js
index 9c152bdf42..327a7e45c8 100644
--- a/test/language/statements/do-while/S12.6.1_A5.js
+++ b/test/language/statements/do-while/S12.6.1_A5.js
@@ -14,7 +14,7 @@ __evaluated = eval("do {__in__do__before__break=1; break; __in__do__after__break
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__in__do__before__break !== 1) {
-	$ERROR('#1: __in__do__before__break === 1. Actual:  __in__do__before__break ==='+ __in__do__before__break  );
+	throw new Test262Error('#1: __in__do__before__break === 1. Actual:  __in__do__before__break ==='+ __in__do__before__break  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -22,7 +22,7 @@ if (__in__do__before__break !== 1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (typeof __in__do__after__break !== "undefined") {
-	$ERROR('#2: typeof __in__do__after__break === "undefined". Actual:  typeof __in__do__after__break ==='+ typeof __in__do__after__break  );
+	throw new Test262Error('#2: typeof __in__do__after__break === "undefined". Actual:  typeof __in__do__after__break ==='+ typeof __in__do__after__break  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -30,7 +30,7 @@ if (typeof __in__do__after__break !== "undefined") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__evaluated !== 1) {
-	$ERROR('#3: __evaluated === 1. Actual:  __evaluated ==='+ __evaluated  );
+	throw new Test262Error('#3: __evaluated === 1. Actual:  __evaluated ==='+ __evaluated  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/do-while/S12.6.1_A7.js b/test/language/statements/do-while/S12.6.1_A7.js
index 55f5f5b70a..afdd89a5ef 100644
--- a/test/language/statements/do-while/S12.6.1_A7.js
+++ b/test/language/statements/do-while/S12.6.1_A7.js
@@ -17,7 +17,7 @@ __evaluated = eval("do eval(\"__condition++\"); while (__condition<5)");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__condition !== 5) {
-	$ERROR('#1: The "do-while" statement is evaluted according to the Standard ');
+	throw new Test262Error('#1: The "do-while" statement is evaluted according to the Standard ');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ if (__condition !== 5) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__evaluated !== 4) {
-	$ERROR('#2: The "do-while" statement returns (normal, V, empty)');
+	throw new Test262Error('#2: The "do-while" statement returns (normal, V, empty)');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/do-while/S12.6.1_A8.js b/test/language/statements/do-while/S12.6.1_A8.js
index 0b708522d3..a3444cbd90 100644
--- a/test/language/statements/do-while/S12.6.1_A8.js
+++ b/test/language/statements/do-while/S12.6.1_A8.js
@@ -15,7 +15,7 @@ __evaluated = eval("do { __condition++; if (((''+__condition/2).split('.')).leng
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__odds !== 5) {
-	$ERROR('#1: __odds === 5. Actual:  __odds ==='+ __odds  );
+	throw new Test262Error('#1: __odds === 5. Actual:  __odds ==='+ __odds  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -23,7 +23,7 @@ if (__odds !== 5) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__evaluated !== 4) {
-	$ERROR('#2: __evaluated === 4. Actual:  __evaluated ==='+ __evaluated  );
+	throw new Test262Error('#2: __evaluated === 4. Actual:  __evaluated ==='+ __evaluated  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/do-while/S12.6.1_A9.js b/test/language/statements/do-while/S12.6.1_A9.js
index 4fa3387fdb..e6ed5756ca 100644
--- a/test/language/statements/do-while/S12.6.1_A9.js
+++ b/test/language/statements/do-while/S12.6.1_A9.js
@@ -14,14 +14,14 @@ try {
 	    var x = 1; 
 	    abaracadabara;
 	} while(0);
-	$ERROR('#1: "abbracadabra" lead to throwing exception');
+	throw new Test262Error('#1: "abbracadabra" lead to throwing exception');
 
 } catch (e) {
     if (e instanceof Test262Error) throw e;
 }
 
 if (x !== 1) {
-	$ERROR('#1.1: x === 1. Actual:  x ==='+ x  );
+	throw new Test262Error('#1.1: x === 1. Actual:  x ==='+ x  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/expression/S12.4_A2_T1.js b/test/language/statements/expression/S12.4_A2_T1.js
index a12c534be6..55eb5d5c20 100644
--- a/test/language/statements/expression/S12.4_A2_T1.js
+++ b/test/language/statements/expression/S12.4_A2_T1.js
@@ -20,7 +20,7 @@ __evaluated = eval("x+1+x==1");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__evaluated !== false) {
-	$ERROR('#1: __evaluated === false. Actual:  __evaluated ==='+ __evaluated  );
+	throw new Test262Error('#1: __evaluated === false. Actual:  __evaluated ==='+ __evaluated  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -30,7 +30,7 @@ __evaluated = eval("1+1+1==1");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__evaluated !== false) {
-	$ERROR('#2: __evaluated === false. Actual:  __evaluated ==='+ __evaluated  );
+	throw new Test262Error('#2: __evaluated === false. Actual:  __evaluated ==='+ __evaluated  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/expression/S12.4_A2_T2.js b/test/language/statements/expression/S12.4_A2_T2.js
index d91f69b659..49aa3938be 100644
--- a/test/language/statements/expression/S12.4_A2_T2.js
+++ b/test/language/statements/expression/S12.4_A2_T2.js
@@ -20,7 +20,7 @@ __evaluated = eval(x);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__evaluated !== 7) {
-	$ERROR('#1: __evaluated === 7. Actual:  __evaluated ==='+ __evaluated  );
+	throw new Test262Error('#1: __evaluated === 7. Actual:  __evaluated ==='+ __evaluated  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -30,7 +30,7 @@ __evaluated = eval("2*"+x+">-1");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__evaluated !== 11) {
-	$ERROR('#2: __evaluated === 11. Actual:  __evaluated ==='+ __evaluated  );
+	throw new Test262Error('#2: __evaluated === 11. Actual:  __evaluated ==='+ __evaluated  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for-in/S12.6.4_A1.js b/test/language/statements/for-in/S12.6.4_A1.js
index 65dcba311e..c29bd5615e 100644
--- a/test/language/statements/for-in/S12.6.4_A1.js
+++ b/test/language/statements/for-in/S12.6.4_A1.js
@@ -14,7 +14,7 @@ try {
 	    var key=__key;
 	};
 } catch (e) {
-	$ERROR('#1: "for(key in undefined){}" does not lead to throwing exception');
+	throw new Test262Error('#1: "for(key in undefined){}" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -23,7 +23,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (key!==undefined) {
-	$ERROR('#2: key === undefined. Actual: key === '+key);
+	throw new Test262Error('#2: key === undefined. Actual: key === '+key);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for-in/S12.6.4_A14_T2.js b/test/language/statements/for-in/S12.6.4_A14_T2.js
index 56047bfe9a..cfb3a58f81 100644
--- a/test/language/statements/for-in/S12.6.4_A14_T2.js
+++ b/test/language/statements/for-in/S12.6.4_A14_T2.js
@@ -20,7 +20,7 @@ for(x in function __func(){return {a:1};}()){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__reached !== "a") {
-	$ERROR('#2: function expession inside of for-in expression allowed');
+	throw new Test262Error('#2: function expession inside of for-in expression allowed');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for-in/S12.6.4_A2.js b/test/language/statements/for-in/S12.6.4_A2.js
index a0a8cbfe76..10e26a60ce 100644
--- a/test/language/statements/for-in/S12.6.4_A2.js
+++ b/test/language/statements/for-in/S12.6.4_A2.js
@@ -14,7 +14,7 @@ try {
 	    var key=__key;
 	};
 } catch (e) {
-	$ERROR('#1: "for(__key in null){}" does not lead to throwing exception');
+	throw new Test262Error('#1: "for(__key in null){}" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -22,7 +22,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (key!==undefined) {
-	$ERROR('#2: key === undefined. Actual: key ==='+key);
+	throw new Test262Error('#2: key === undefined. Actual: key ==='+key);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for-in/S12.6.4_A3.1.js b/test/language/statements/for-in/S12.6.4_A3.1.js
index bc239f6415..1bfe2b9bd4 100644
--- a/test/language/statements/for-in/S12.6.4_A3.1.js
+++ b/test/language/statements/for-in/S12.6.4_A3.1.js
@@ -19,7 +19,7 @@ __evaluated = eval("for(var ind in (arr=[2,1,4,3]))__str+=arr[ind]");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__evaluated !== __str) {
-	$ERROR('#1: __evaluated === __str. Actual:  __evaluated ==='+ __evaluated  );
+	throw new Test262Error('#1: __evaluated === __str. Actual:  __evaluated ==='+ __evaluated  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -27,7 +27,7 @@ if (__evaluated !== __str) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (!( (__str.indexOf("2")!==-1)&&(__str.indexOf("1")!==-1)&&(__str.indexOf("4")!==-1)&&(__str.indexOf("3")!==-1) )) {
-	$ERROR('#2: (__str.indexOf("2")!==-1)&&(__str.indexOf("1")!==-1)&&(__str.indexOf("4")!==-1)&&(__str.indexOf("3")!==-1)');
+	throw new Test262Error('#2: (__str.indexOf("2")!==-1)&&(__str.indexOf("1")!==-1)&&(__str.indexOf("4")!==-1)&&(__str.indexOf("3")!==-1)');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for-in/S12.6.4_A3.js b/test/language/statements/for-in/S12.6.4_A3.js
index 9f1c46339c..41573401bb 100644
--- a/test/language/statements/for-in/S12.6.4_A3.js
+++ b/test/language/statements/for-in/S12.6.4_A3.js
@@ -19,7 +19,7 @@ __evaluated = eval("for(ind in (arr=[2,1,4,3]))__str+=arr[ind]");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__evaluated !== __str) {
-	$ERROR('#1: __evaluated === __str. Actual:  __evaluated ==='+ __evaluated  );
+	throw new Test262Error('#1: __evaluated === __str. Actual:  __evaluated ==='+ __evaluated  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -27,7 +27,7 @@ if (__evaluated !== __str) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (!( (__str.indexOf("2")!==-1)&&(__str.indexOf("1")!==-1)&&(__str.indexOf("4")!==-1)&&(__str.indexOf("3")!==-1) )) {
-	$ERROR('#2: (__str.indexOf("2")!==-1)&&(__str.indexOf("1")!==-1)&&(__str.indexOf("4")!==-1)&&(__str.indexOf("3")!==-1)');
+	throw new Test262Error('#2: (__str.indexOf("2")!==-1)&&(__str.indexOf("1")!==-1)&&(__str.indexOf("4")!==-1)&&(__str.indexOf("3")!==-1)');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for-in/S12.6.4_A4.1.js b/test/language/statements/for-in/S12.6.4_A4.1.js
index 9670076004..2e74efed18 100644
--- a/test/language/statements/for-in/S12.6.4_A4.1.js
+++ b/test/language/statements/for-in/S12.6.4_A4.1.js
@@ -17,7 +17,7 @@ __evaluated = eval("for(var ind in (hash={2:'b',1:'a',4:'d',3:'c'}))__str+=hash[
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if ( !( (__evaluated.indexOf("a")!==-1)& (__evaluated.indexOf("b")!==-1)& (__evaluated.indexOf("c")!==-1)&(__evaluated.indexOf("d")!==-1) ) ) {
-	$ERROR('#1: (__evaluated.indexOf("a")!==-1)& (__evaluated.indexOf("b")!==-1)& (__evaluated.indexOf("c")!==-1)&(__evaluated.indexOf("d")!==-1)');
+	throw new Test262Error('#1: (__evaluated.indexOf("a")!==-1)& (__evaluated.indexOf("b")!==-1)& (__evaluated.indexOf("c")!==-1)&(__evaluated.indexOf("d")!==-1)');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ if ( !( (__evaluated.indexOf("a")!==-1)& (__evaluated.indexOf("b")!==-1)& (__eva
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__str !== __evaluated) {
-	$ERROR('#2: __str === __evaluated. Actual:  __str ==='+ __str  );
+	throw new Test262Error('#2: __str === __evaluated. Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for-in/S12.6.4_A4.js b/test/language/statements/for-in/S12.6.4_A4.js
index e62604b899..856a2368fb 100644
--- a/test/language/statements/for-in/S12.6.4_A4.js
+++ b/test/language/statements/for-in/S12.6.4_A4.js
@@ -17,7 +17,7 @@ __evaluated = eval("for(ind in (hash={2:'b',1:'a',4:'d',3:'c'}))__str+=hash[ind]
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if ( !( (__evaluated.indexOf("a")!==-1)& (__evaluated.indexOf("b")!==-1)& (__evaluated.indexOf("c")!==-1)&(__evaluated.indexOf("d")!==-1) ) ) {
-	$ERROR('#1: (__evaluated.indexOf("a")!==-1)& (__evaluated.indexOf("b")!==-1)& (__evaluated.indexOf("c")!==-1)&(__evaluated.indexOf("d")!==-1)');
+	throw new Test262Error('#1: (__evaluated.indexOf("a")!==-1)& (__evaluated.indexOf("b")!==-1)& (__evaluated.indexOf("c")!==-1)&(__evaluated.indexOf("d")!==-1)');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ if ( !( (__evaluated.indexOf("a")!==-1)& (__evaluated.indexOf("b")!==-1)& (__eva
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__str !== __evaluated) {
-	$ERROR('#2: __str === __evaluated. Actual:  __str ==='+ __str  );
+	throw new Test262Error('#2: __str === __evaluated. Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for-in/S12.6.4_A5.1.js b/test/language/statements/for-in/S12.6.4_A5.1.js
index b6f5097a30..9068907bbd 100644
--- a/test/language/statements/for-in/S12.6.4_A5.1.js
+++ b/test/language/statements/for-in/S12.6.4_A5.1.js
@@ -40,4 +40,4 @@ if(!(
 (__arr.indexOf("db2")!==-1)&
 (__arr.indexOf("dc3")!==-1)&
 (__arr.indexOf("dd4")!==-1)
-)) $ERROR('#1: The nested for-in Statement applied to hierarchial object works properly as described in the Standard');
+)) throw new Test262Error('#1: The nested for-in Statement applied to hierarchial object works properly as described in the Standard');
diff --git a/test/language/statements/for-in/S12.6.4_A5.js b/test/language/statements/for-in/S12.6.4_A5.js
index 5ba6ea4a7c..2e6558e08a 100644
--- a/test/language/statements/for-in/S12.6.4_A5.js
+++ b/test/language/statements/for-in/S12.6.4_A5.js
@@ -40,4 +40,4 @@ if(!(
 (__arr.indexOf("db2")!==-1)&
 (__arr.indexOf("dc3")!==-1)&
 (__arr.indexOf("dd4")!==-1)
-)) $ERROR('#1: The nested for-in Statement applied to hierarchial object works properly as described in the Standard');
+)) throw new Test262Error('#1: The nested for-in Statement applied to hierarchial object works properly as described in the Standard');
diff --git a/test/language/statements/for-in/S12.6.4_A6.1.js b/test/language/statements/for-in/S12.6.4_A6.1.js
index 773b9e7168..d254bb84b7 100644
--- a/test/language/statements/for-in/S12.6.4_A6.1.js
+++ b/test/language/statements/for-in/S12.6.4_A6.1.js
@@ -28,7 +28,7 @@ for (var key in __instance){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (!((__accum.indexOf("prop1")!==-1)&&(__accum.indexOf("feat2")!==-1)&&(__accum.indexOf("hinthinted")!==-1))) {
-	$ERROR('#1: (__accum.indexOf("prop1")!==-1)&&(__accum.indexOf("feat2")!==-1)&&(__accum.indexOf("hinthinted")!==-1)');
+	throw new Test262Error('#1: (__accum.indexOf("prop1")!==-1)&&(__accum.indexOf("feat2")!==-1)&&(__accum.indexOf("hinthinted")!==-1)');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -36,7 +36,7 @@ if (!((__accum.indexOf("prop1")!==-1)&&(__accum.indexOf("feat2")!==-1)&&(__accum
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__accum.indexOf("hintprotohint")!==-1) {
-	$ERROR('#2: __accum.indexOf("hintprotohint") === -1. Actual:  __accum.indexOf("hintprotohint") ==='+ __accum.indexOf("hintprotohint")  );
+	throw new Test262Error('#2: __accum.indexOf("hintprotohint") === -1. Actual:  __accum.indexOf("hintprotohint") ==='+ __accum.indexOf("hintprotohint")  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for-in/S12.6.4_A6.js b/test/language/statements/for-in/S12.6.4_A6.js
index f67558d6c6..b17182dbce 100644
--- a/test/language/statements/for-in/S12.6.4_A6.js
+++ b/test/language/statements/for-in/S12.6.4_A6.js
@@ -28,7 +28,7 @@ for (key in __instance){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (!((__accum.indexOf("prop1")!==-1)&&(__accum.indexOf("feat2")!==-1)&&(__accum.indexOf("hinthinted")!==-1))) {
-	$ERROR('#1: (__accum.indexOf("prop1")!==-1)&&(__accum.indexOf("feat2")!==-1)&&(__accum.indexOf("hinthinted")!==-1)');
+	throw new Test262Error('#1: (__accum.indexOf("prop1")!==-1)&&(__accum.indexOf("feat2")!==-1)&&(__accum.indexOf("hinthinted")!==-1)');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -36,7 +36,7 @@ if (!((__accum.indexOf("prop1")!==-1)&&(__accum.indexOf("feat2")!==-1)&&(__accum
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__accum.indexOf("hintprotohint")!==-1) {
-	$ERROR('#2: __accum.indexOf("hintprotohint") === -1. Actual:  __accum.indexOf("hintprotohint") ==='+ __accum.indexOf("hintprotohint")  );
+	throw new Test262Error('#2: __accum.indexOf("hintprotohint") === -1. Actual:  __accum.indexOf("hintprotohint") ==='+ __accum.indexOf("hintprotohint")  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for-in/S12.6.4_A7_T1.js b/test/language/statements/for-in/S12.6.4_A7_T1.js
index 56d239fe65..cef8bda45a 100644
--- a/test/language/statements/for-in/S12.6.4_A7_T1.js
+++ b/test/language/statements/for-in/S12.6.4_A7_T1.js
@@ -29,7 +29,7 @@ for (__key in __obj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (!((__accum.indexOf("aa1")!==-1)&&(__accum.indexOf("ca3")!==-1))) {
-	$ERROR('#1: (__accum.indexOf("aa1")!==-1)&&(__accum.indexOf("ca3")!==-1)');
+	throw new Test262Error('#1: (__accum.indexOf("aa1")!==-1)&&(__accum.indexOf("ca3")!==-1)');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -37,7 +37,7 @@ if (!((__accum.indexOf("aa1")!==-1)&&(__accum.indexOf("ca3")!==-1))) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__accum.indexOf("ba2")!==-1) {
-	$ERROR('#2: __accum.indexOf("ba2") === -1. Actual:  __accum.indexOf("ba2") ==='+ __accum.indexOf("ba2")  );
+	throw new Test262Error('#2: __accum.indexOf("ba2") === -1. Actual:  __accum.indexOf("ba2") ==='+ __accum.indexOf("ba2")  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for-in/S12.6.4_A7_T2.js b/test/language/statements/for-in/S12.6.4_A7_T2.js
index 93cec062f8..4ae8a3946e 100644
--- a/test/language/statements/for-in/S12.6.4_A7_T2.js
+++ b/test/language/statements/for-in/S12.6.4_A7_T2.js
@@ -29,7 +29,7 @@ for (var __key in __obj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (!((__accum.indexOf("aa1")!==-1)&&(__accum.indexOf("ca3")!==-1))) {
-	$ERROR('#1: (__accum.indexOf("aa1")!==-1)&&(__accum.indexOf("ca3")!==-1)');
+	throw new Test262Error('#1: (__accum.indexOf("aa1")!==-1)&&(__accum.indexOf("ca3")!==-1)');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -37,7 +37,7 @@ if (!((__accum.indexOf("aa1")!==-1)&&(__accum.indexOf("ca3")!==-1))) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__accum.indexOf("ba2")!==-1) {
-	$ERROR('#2: __accum.indexOf("ba2") === -1. Actual:  __accum.indexOf("ba2") ==='+ __accum.indexOf("ba2")  );
+	throw new Test262Error('#2: __accum.indexOf("ba2") === -1. Actual:  __accum.indexOf("ba2") ==='+ __accum.indexOf("ba2")  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for-of/break-from-catch.js b/test/language/statements/for-of/break-from-catch.js
index e1a3a2ab30..f059bd5bd6 100644
--- a/test/language/statements/for-of/break-from-catch.js
+++ b/test/language/statements/for-of/break-from-catch.js
@@ -10,7 +10,7 @@ features: [generators]
 
 function* values() {
   yield 1;
-  $ERROR('This code is unreachable (following `yield` statement).');
+  throw new Test262Error('This code is unreachable (following `yield` statement).');
 }
 var iterator = values();
 var i = 0;
@@ -22,10 +22,10 @@ for (var x of iterator) {
   } catch (err) {
     i++;
     break;
-    $ERROR('This code is unreachable (following `break` statement).');
+    throw new Test262Error('This code is unreachable (following `break` statement).');
   }
 
-  $ERROR('This code is unreachable (following `try` statement).');
+  throw new Test262Error('This code is unreachable (following `try` statement).');
 }
 
 assert.sameValue(i, 1);
diff --git a/test/language/statements/for-of/break-from-finally.js b/test/language/statements/for-of/break-from-finally.js
index 27cbe5e515..199d418380 100644
--- a/test/language/statements/for-of/break-from-finally.js
+++ b/test/language/statements/for-of/break-from-finally.js
@@ -10,7 +10,7 @@ features: [generators]
 
 function* values() {
   yield 1;
-  $ERROR('This code is unreachable (following `yield` statement).');
+  throw new Test262Error('This code is unreachable (following `yield` statement).');
 }
 var iterator = values();
 var i = 0;
@@ -21,10 +21,10 @@ for (var x of iterator) {
     i++;
     break;
 
-    $ERROR('This code is unreachable (following `break` statement).');
+    throw new Test262Error('This code is unreachable (following `break` statement).');
   }
 
-  $ERROR('This code is unreachable (following `try` statement).');
+  throw new Test262Error('This code is unreachable (following `try` statement).');
 }
 
 assert.sameValue(i, 1);
diff --git a/test/language/statements/for-of/break-from-try.js b/test/language/statements/for-of/break-from-try.js
index 7ea701d701..b6ae1523ef 100644
--- a/test/language/statements/for-of/break-from-try.js
+++ b/test/language/statements/for-of/break-from-try.js
@@ -10,7 +10,7 @@ features: [generators]
 
 function* values() {
   yield 1;
-  $ERROR('This code is unreachable (following `yield` statement).');
+  throw new Test262Error('This code is unreachable (following `yield` statement).');
 }
 var iterator = values();
 var i = 0;
@@ -20,10 +20,10 @@ for (var x of iterator) {
     i++;
     break;
 
-    $ERROR('This code is unreachable (following `break` statement).');
+    throw new Test262Error('This code is unreachable (following `break` statement).');
   } catch (err) {}
 
-  $ERROR('This code is unreachable (following `try` statement).');
+  throw new Test262Error('This code is unreachable (following `try` statement).');
 }
 
 assert.sameValue(i, 1);
diff --git a/test/language/statements/for-of/break-label-from-catch.js b/test/language/statements/for-of/break-label-from-catch.js
index caa28f59f4..f041de44da 100644
--- a/test/language/statements/for-of/break-label-from-catch.js
+++ b/test/language/statements/for-of/break-label-from-catch.js
@@ -10,7 +10,7 @@ features: [generators]
 
 function* values() {
   yield 1;
-  $ERROR('This code is unreachable (following `yield` statement).');
+  throw new Test262Error('This code is unreachable (following `yield` statement).');
 }
 var iterator = values();
 var i = 0;
@@ -23,13 +23,13 @@ while (true) {
     } catch (err) {
       i++;
       break outer;
-      $ERROR('This code is unreachable (following `break` statement).');
+      throw new Test262Error('This code is unreachable (following `break` statement).');
     }
 
-    $ERROR('This code is unreachable (following `try` statement).');
+    throw new Test262Error('This code is unreachable (following `try` statement).');
   }
 
-  $ERROR('This code is unreachable (following `for..of` statement).');
+  throw new Test262Error('This code is unreachable (following `for..of` statement).');
 }
 
 assert.sameValue(i, 1);
diff --git a/test/language/statements/for-of/break-label-from-finally.js b/test/language/statements/for-of/break-label-from-finally.js
index 1309775392..4fb3ddc0e4 100644
--- a/test/language/statements/for-of/break-label-from-finally.js
+++ b/test/language/statements/for-of/break-label-from-finally.js
@@ -10,7 +10,7 @@ features: [generators]
 
 function* values() {
   yield 1;
-  $ERROR('This code is unreachable (following `yield` statement).');
+  throw new Test262Error('This code is unreachable (following `yield` statement).');
 }
 var iterator = values();
 var i = 0;
@@ -22,13 +22,13 @@ while (true) {
     } finally {
       i++;
       break outer;
-      $ERROR('This code is unreachable (following `break` statement).');
+      throw new Test262Error('This code is unreachable (following `break` statement).');
     }
 
-    $ERROR('This code is unreachable (following `try` statement).');
+    throw new Test262Error('This code is unreachable (following `try` statement).');
   }
 
-  $ERROR('This code is unreachable (following `for..of` statement).');
+  throw new Test262Error('This code is unreachable (following `for..of` statement).');
 }
 
 assert.sameValue(i, 1);
diff --git a/test/language/statements/for-of/break-label-from-try.js b/test/language/statements/for-of/break-label-from-try.js
index 9add8abfa4..bd8073a66e 100644
--- a/test/language/statements/for-of/break-label-from-try.js
+++ b/test/language/statements/for-of/break-label-from-try.js
@@ -10,7 +10,7 @@ features: [generators]
 
 function* values() {
   yield 1;
-  $ERROR('This code is unreachable (following `yield` statement).');
+  throw new Test262Error('This code is unreachable (following `yield` statement).');
 }
 var iterator = values();
 var i = 0;
@@ -21,13 +21,13 @@ while (true) {
     try {
       i++;
       break outer;
-      $ERROR('This code is unreachable (following `break` statement).');
+      throw new Test262Error('This code is unreachable (following `break` statement).');
     } catch (err) {}
 
-    $ERROR('This code is unreachable (following `try` statement).');
+    throw new Test262Error('This code is unreachable (following `try` statement).');
   }
 
-  $ERROR('This code is unreachable (following `for..of` statement).');
+  throw new Test262Error('This code is unreachable (following `for..of` statement).');
 }
 
 assert.sameValue(i, 1);
diff --git a/test/language/statements/for-of/break-label.js b/test/language/statements/for-of/break-label.js
index 931477837f..879acb7e15 100644
--- a/test/language/statements/for-of/break-label.js
+++ b/test/language/statements/for-of/break-label.js
@@ -10,7 +10,7 @@ features: [generators]
 
 function* values() {
   yield 1;
-  $ERROR('This code is unreachable (following `yield` statement).');
+  throw new Test262Error('This code is unreachable (following `yield` statement).');
 }
 var iterator = values();
 var i = 0;
@@ -21,9 +21,9 @@ while (true) {
     i++;
     break outer;
 
-    $ERROR('This code is unreachable (following `break` statement).');
+    throw new Test262Error('This code is unreachable (following `break` statement).');
   }
-  $ERROR('This code is unreachable (following `for..of` statement).');
+  throw new Test262Error('This code is unreachable (following `for..of` statement).');
 }
 
 assert.sameValue(i, 1);
diff --git a/test/language/statements/for-of/break.js b/test/language/statements/for-of/break.js
index e986efa59e..63a552c22c 100644
--- a/test/language/statements/for-of/break.js
+++ b/test/language/statements/for-of/break.js
@@ -9,7 +9,7 @@ features: [generators]
 
 function* values() {
   yield 1;
-  $ERROR('This code is unreachable (following `yield` statement).');
+  throw new Test262Error('This code is unreachable (following `yield` statement).');
 }
 var iterator = values();
 var i = 0;
@@ -18,7 +18,7 @@ for (var x of iterator) {
   i++;
   break;
 
-  $ERROR('This code is unreachable.');
+  throw new Test262Error('This code is unreachable.');
 }
 
 assert.sameValue(i, 1);
diff --git a/test/language/statements/for-of/continue-from-catch.js b/test/language/statements/for-of/continue-from-catch.js
index 287a28786b..ca6ca76f81 100644
--- a/test/language/statements/for-of/continue-from-catch.js
+++ b/test/language/statements/for-of/continue-from-catch.js
@@ -22,10 +22,10 @@ for (var x of iterator) {
     i++;
     continue;
 
-    $ERROR('This code is unreachable (following `continue` statement).');
+    throw new Test262Error('This code is unreachable (following `continue` statement).');
   }
 
-  $ERROR('This code is unreachable (following `try` statement).');
+  throw new Test262Error('This code is unreachable (following `try` statement).');
 }
 
 assert.sameValue(i, 2);
diff --git a/test/language/statements/for-of/continue-from-finally.js b/test/language/statements/for-of/continue-from-finally.js
index c998b1f714..516a60890f 100644
--- a/test/language/statements/for-of/continue-from-finally.js
+++ b/test/language/statements/for-of/continue-from-finally.js
@@ -23,10 +23,10 @@ for (var x of iterator) {
     i++;
     continue;
 
-    $ERROR('This code is unreachable (following `continue` statement).');
+    throw new Test262Error('This code is unreachable (following `continue` statement).');
   }
 
-  $ERROR('This code is unreachable (following `try` statement).');
+  throw new Test262Error('This code is unreachable (following `try` statement).');
 }
 
 assert.sameValue(i, 2);
diff --git a/test/language/statements/for-of/continue-from-try.js b/test/language/statements/for-of/continue-from-try.js
index 17b465b70e..08d66dd2cb 100644
--- a/test/language/statements/for-of/continue-from-try.js
+++ b/test/language/statements/for-of/continue-from-try.js
@@ -20,10 +20,10 @@ for (var x of iterator) {
     i++;
     continue;
 
-    $ERROR('This code is unreachable (following `continue` statement).');
+    throw new Test262Error('This code is unreachable (following `continue` statement).');
   } catch (err) {}
 
-  $ERROR('This code is unreachable (following `try` statement).');
+  throw new Test262Error('This code is unreachable (following `try` statement).');
 }
 
 assert.sameValue(i, 2);
diff --git a/test/language/statements/for-of/continue-label-from-catch.js b/test/language/statements/for-of/continue-label-from-catch.js
index 431e86bc30..db8cf35fea 100644
--- a/test/language/statements/for-of/continue-label-from-catch.js
+++ b/test/language/statements/for-of/continue-label-from-catch.js
@@ -26,13 +26,13 @@ while (loop) {
     } catch (err) {
       i++;
       continue outer;
-      $ERROR('This code is unreachable (following `continue` statement).');
+      throw new Test262Error('This code is unreachable (following `continue` statement).');
     }
 
-    $ERROR('This code is unreachable (following `try` statement).');
+    throw new Test262Error('This code is unreachable (following `try` statement).');
   }
 
-  $ERROR('This code is unreachable (following `for..of` statement).');
+  throw new Test262Error('This code is unreachable (following `for..of` statement).');
 }
 
 assert.sameValue(i, 1);
diff --git a/test/language/statements/for-of/continue-label-from-finally.js b/test/language/statements/for-of/continue-label-from-finally.js
index d3cad05021..8a08fcfe27 100644
--- a/test/language/statements/for-of/continue-label-from-finally.js
+++ b/test/language/statements/for-of/continue-label-from-finally.js
@@ -28,13 +28,13 @@ while (loop) {
       i++;
       continue outer;
 
-      $ERROR('This code is unreachable (following `continue` statement).');
+      throw new Test262Error('This code is unreachable (following `continue` statement).');
     }
 
-    $ERROR('This code is unreachable (following `try` statement).');
+    throw new Test262Error('This code is unreachable (following `try` statement).');
   }
 
-  $ERROR('This code is unreachable (following `for..of` statement).');
+  throw new Test262Error('This code is unreachable (following `for..of` statement).');
 }
 
 assert.sameValue(i, 1);
diff --git a/test/language/statements/for-of/continue-label-from-try.js b/test/language/statements/for-of/continue-label-from-try.js
index e34e45114f..efc8b98a00 100644
--- a/test/language/statements/for-of/continue-label-from-try.js
+++ b/test/language/statements/for-of/continue-label-from-try.js
@@ -23,13 +23,13 @@ while (loop) {
     try {
       i++;
       continue outer;
-      $ERROR('This code is unreachable (following `continue` statement).');
+      throw new Test262Error('This code is unreachable (following `continue` statement).');
     } catch (err) {}
 
-    $ERROR('This code is unreachable (following `try` statment).');
+    throw new Test262Error('This code is unreachable (following `try` statment).');
   }
 
-  $ERROR('This code is unreachable (following `for..of` statement).');
+  throw new Test262Error('This code is unreachable (following `for..of` statement).');
 }
 
 assert.sameValue(i, 1);
diff --git a/test/language/statements/for-of/continue-label.js b/test/language/statements/for-of/continue-label.js
index 2b17757b3f..3b78fe07c8 100644
--- a/test/language/statements/for-of/continue-label.js
+++ b/test/language/statements/for-of/continue-label.js
@@ -23,9 +23,9 @@ while (loop) {
     i++;
     continue outer;
 
-    $ERROR('This code is unreachable (inside for-of).');
+    throw new Test262Error('This code is unreachable (inside for-of).');
   }
-  $ERROR('This code is unreachable (inside while).');
+  throw new Test262Error('This code is unreachable (inside while).');
 }
 
 assert.sameValue(i, 1);
diff --git a/test/language/statements/for-of/continue.js b/test/language/statements/for-of/continue.js
index 4ac01b87ef..ca2daf57df 100644
--- a/test/language/statements/for-of/continue.js
+++ b/test/language/statements/for-of/continue.js
@@ -18,7 +18,7 @@ for (var x of iterator) {
   i++;
   continue;
 
-  $ERROR('This code is unreachable.');
+  throw new Test262Error('This code is unreachable.');
 }
 
 assert.sameValue(i, 2);
diff --git a/test/language/statements/for-of/generator-close-via-break.js b/test/language/statements/for-of/generator-close-via-break.js
index ca18fde77b..3614461145 100644
--- a/test/language/statements/for-of/generator-close-via-break.js
+++ b/test/language/statements/for-of/generator-close-via-break.js
@@ -15,11 +15,11 @@ function* values() {
   startedCount += 1;
   try {
     yield;
-    $ERROR('This code is unreachable (within `try` block)');
+    throw new Test262Error('This code is unreachable (within `try` block)');
   } finally {
     finallyCount += 1;
   }
-  $ERROR('This code is unreachable (following `try` statement)');
+  throw new Test262Error('This code is unreachable (following `try` statement)');
 }
 var iterable = values();
 
diff --git a/test/language/statements/for-of/generator-close-via-continue.js b/test/language/statements/for-of/generator-close-via-continue.js
index 0fe66db8e8..231cb2ca03 100644
--- a/test/language/statements/for-of/generator-close-via-continue.js
+++ b/test/language/statements/for-of/generator-close-via-continue.js
@@ -31,11 +31,11 @@ function* values() {
   startedCount += 1;
   try {
     yield;
-    $ERROR('This code is unreachable (within `try` block)');
+    throw new Test262Error('This code is unreachable (within `try` block)');
   } finally {
     finallyCount += 1;
   }
-  $ERROR('This code is unreachable (following `try` statement)');
+  throw new Test262Error('This code is unreachable (following `try` statement)');
 }
 var iterable = values();
 
diff --git a/test/language/statements/for-of/generator-close-via-return.js b/test/language/statements/for-of/generator-close-via-return.js
index a5963fae59..ddce016ec3 100644
--- a/test/language/statements/for-of/generator-close-via-return.js
+++ b/test/language/statements/for-of/generator-close-via-return.js
@@ -15,11 +15,11 @@ function* values() {
   startedCount += 1;
   try {
     yield;
-    $ERROR('This code is unreachable (within `try` block)');
+    throw new Test262Error('This code is unreachable (within `try` block)');
   } finally {
     finallyCount += 1;
   }
-  $ERROR('This code is unreachable (following `try` statement)');
+  throw new Test262Error('This code is unreachable (following `try` statement)');
 }
 var iterable = values();
 
diff --git a/test/language/statements/for-of/generator-close-via-throw.js b/test/language/statements/for-of/generator-close-via-throw.js
index bbdadaf19b..36a9d8a7ba 100644
--- a/test/language/statements/for-of/generator-close-via-throw.js
+++ b/test/language/statements/for-of/generator-close-via-throw.js
@@ -15,11 +15,11 @@ function* values() {
   startedCount += 1;
   try {
     yield;
-    $ERROR('This code is unreachable (within `try` block)');
+    throw new Test262Error('This code is unreachable (within `try` block)');
   } finally {
     finallyCount += 1;
   }
-  $ERROR('This code is unreachable (following `try` statement)');
+  throw new Test262Error('This code is unreachable (following `try` statement)');
 }
 var iterable = values();
 
diff --git a/test/language/statements/for-of/iterator-next-result-type.js b/test/language/statements/for-of/iterator-next-result-type.js
index 1b27b856a6..a82579a1b1 100644
--- a/test/language/statements/for-of/iterator-next-result-type.js
+++ b/test/language/statements/for-of/iterator-next-result-type.js
@@ -80,11 +80,11 @@ firstIterResult = new Proxy({}, {
     if (name === 'value') {
       return null;
     }
-    $ERROR('This code is unreachable.');
+    throw new Test262Error('This code is unreachable.');
   }
 });
 for (var x of iterable) {
-  $ERROR('This code is unreachable.');
+  throw new Test262Error('This code is unreachable.');
 }
 
 firstIterResult = new Proxy({}, {
@@ -95,7 +95,7 @@ firstIterResult = new Proxy({}, {
     if (name === 'value') {
       return 23;
     }
-    $ERROR('This code is unreachable.');
+    throw new Test262Error('This code is unreachable.');
   }
 });
 var i = 0;
diff --git a/test/language/statements/for-of/return-from-catch.js b/test/language/statements/for-of/return-from-catch.js
index 4e301aaa84..4a2b782aa7 100644
--- a/test/language/statements/for-of/return-from-catch.js
+++ b/test/language/statements/for-of/return-from-catch.js
@@ -10,7 +10,7 @@ features: [generators]
 
 function* values() {
   yield 1;
-  $ERROR('This code is unreachable (following `yield` statement).');
+  throw new Test262Error('This code is unreachable (following `yield` statement).');
 }
 var iterator = values();
 var i = 0;
@@ -23,13 +23,13 @@ var result = (function() {
       i++;
       return 34;
 
-      $ERROR('This code is unreachable (following `return` statement).');
+      throw new Test262Error('This code is unreachable (following `return` statement).');
     }
 
-    $ERROR('This code is unreachable (following `try` statement).');
+    throw new Test262Error('This code is unreachable (following `try` statement).');
   }
 
-  $ERROR('This code is unreachable (following `for..in` statement).');
+  throw new Test262Error('This code is unreachable (following `for..in` statement).');
 })();
 
 assert.sameValue(result, 34);
diff --git a/test/language/statements/for-of/return-from-finally.js b/test/language/statements/for-of/return-from-finally.js
index 6825662c36..0e42bbdec7 100644
--- a/test/language/statements/for-of/return-from-finally.js
+++ b/test/language/statements/for-of/return-from-finally.js
@@ -10,7 +10,7 @@ features: [generators]
 
 function* values() {
   yield 1;
-  $ERROR('This code is unreachable (following `yield` statement).');
+  throw new Test262Error('This code is unreachable (following `yield` statement).');
 }
 var iterator = values();
 var i = 0;
@@ -22,13 +22,13 @@ var result = (function() {
       i++;
       return 34;
 
-      $ERROR('This code is unreachable (following `return` statement).');
+      throw new Test262Error('This code is unreachable (following `return` statement).');
     }
 
-    $ERROR('This code is unreachable (following `try` statement).');
+    throw new Test262Error('This code is unreachable (following `try` statement).');
   }
 
-  $ERROR('This code is unreachable (following `for..in` statement).');
+  throw new Test262Error('This code is unreachable (following `for..in` statement).');
 })();
 
 assert.sameValue(result, 34);
diff --git a/test/language/statements/for-of/return-from-try.js b/test/language/statements/for-of/return-from-try.js
index 7d6cef0a6c..a79cc7425e 100644
--- a/test/language/statements/for-of/return-from-try.js
+++ b/test/language/statements/for-of/return-from-try.js
@@ -10,7 +10,7 @@ features: [generators]
 
 function* values() {
   yield 1;
-  $ERROR('This code is unreachable (following `yield` statement).');
+  throw new Test262Error('This code is unreachable (following `yield` statement).');
 }
 var iterator = values();
 var i = 0;
@@ -21,15 +21,15 @@ var result = (function() {
       i++;
       return 34;
 
-      $ERROR('This code is unreachable (following `return` statement).');
+      throw new Test262Error('This code is unreachable (following `return` statement).');
     } catch(err) {
-      $ERROR('This code is unreachable (within `catch` block).');
+      throw new Test262Error('This code is unreachable (within `catch` block).');
     }
 
-    $ERROR('This code is unreachable (following `try` statement).');
+    throw new Test262Error('This code is unreachable (following `try` statement).');
   }
 
-  $ERROR('This code is unreachable (following `for..in` statement).');
+  throw new Test262Error('This code is unreachable (following `for..in` statement).');
 })();
 
 assert.sameValue(result, 34);
diff --git a/test/language/statements/for-of/return.js b/test/language/statements/for-of/return.js
index e2e52448a3..226bab97b8 100644
--- a/test/language/statements/for-of/return.js
+++ b/test/language/statements/for-of/return.js
@@ -9,7 +9,7 @@ features: [generators]
 
 function* values() {
   yield 1;
-  $ERROR('This code is unreachable (following `yield` statement).');
+  throw new Test262Error('This code is unreachable (following `yield` statement).');
 }
 var iterator = values();
 var i = 0;
@@ -19,10 +19,10 @@ var result = (function() {
     i++;
     return 34;
 
-    $ERROR('This code is unreachable (following `return` statement).');
+    throw new Test262Error('This code is unreachable (following `return` statement).');
   }
 
-  $ERROR('This code is unreachable (following `for..of` statement).');
+  throw new Test262Error('This code is unreachable (following `for..of` statement).');
 })();
 
 assert.sameValue(result, 34);
diff --git a/test/language/statements/for-of/throw-from-catch.js b/test/language/statements/for-of/throw-from-catch.js
index 50e3c5de53..ddddeccaa3 100644
--- a/test/language/statements/for-of/throw-from-catch.js
+++ b/test/language/statements/for-of/throw-from-catch.js
@@ -10,7 +10,7 @@ features: [generators]
 
 function* values() {
   yield 1;
-  $ERROR('This code is unreachable (following `yield` statement).');
+  throw new Test262Error('This code is unreachable (following `yield` statement).');
 }
 var CustomError = function() {};
 var iterator = values();
@@ -25,13 +25,13 @@ assert.throws(CustomError, function() {
       i++;
       throw error;
 
-      $ERROR('This code is unreachable (following `throw` statement).');
+      throw new Test262Error('This code is unreachable (following `throw` statement).');
     }
 
-    $ERROR('This code is unreachable (following `try` statement).');
+    throw new Test262Error('This code is unreachable (following `try` statement).');
   }
 
-  $ERROR('This code is unreachable (following `for..in` statement).');
+  throw new Test262Error('This code is unreachable (following `for..in` statement).');
 });
 
 assert.sameValue(i, 1);
diff --git a/test/language/statements/for-of/throw-from-finally.js b/test/language/statements/for-of/throw-from-finally.js
index 9351b12c3b..6f30a41767 100644
--- a/test/language/statements/for-of/throw-from-finally.js
+++ b/test/language/statements/for-of/throw-from-finally.js
@@ -10,7 +10,7 @@ features: [generators]
 
 function* values() {
   yield 1;
-  $ERROR('This code is unreachable (following `yield` statement).');
+  throw new Test262Error('This code is unreachable (following `yield` statement).');
 }
 var CustomError = function() {};
 var iterator = values();
@@ -24,13 +24,13 @@ assert.throws(CustomError, function() {
       i++;
       throw error;
 
-      $ERROR('This code is unreachable (following `throw` statement).');
+      throw new Test262Error('This code is unreachable (following `throw` statement).');
     }
 
-    $ERROR('This code is unreachable (following `try` statement).');
+    throw new Test262Error('This code is unreachable (following `try` statement).');
   }
 
-  $ERROR('This code is unreachable (following `for..in` statement).');
+  throw new Test262Error('This code is unreachable (following `for..in` statement).');
 });
 
 assert.sameValue(i, 1);
diff --git a/test/language/statements/for-of/throw.js b/test/language/statements/for-of/throw.js
index 1f088bc695..79597d5e70 100644
--- a/test/language/statements/for-of/throw.js
+++ b/test/language/statements/for-of/throw.js
@@ -9,7 +9,7 @@ features: [generators]
 
 function* values() {
   yield 1;
-  $ERROR('This code is unreachable (following `yield` statement).');
+  throw new Test262Error('This code is unreachable (following `yield` statement).');
 }
 var CustomError = function() {};
 var iterator = values();
@@ -21,10 +21,10 @@ assert.throws(CustomError, function() {
     i++;
     throw error;
 
-    $ERROR('This code is unreachable (following `throw` statement).');
+    throw new Test262Error('This code is unreachable (following `throw` statement).');
   }
 
-  $ERROR('This code is unreachable (following `for..in` statement).');
+  throw new Test262Error('This code is unreachable (following `for..in` statement).');
 });
 
 assert.sameValue(i, 1);
diff --git a/test/language/statements/for-of/yield-from-catch.js b/test/language/statements/for-of/yield-from-catch.js
index 84c723d0f6..a912aab52d 100644
--- a/test/language/statements/for-of/yield-from-catch.js
+++ b/test/language/statements/for-of/yield-from-catch.js
@@ -17,7 +17,7 @@ var controlIterator = (function*() {
   for (var x of dataIterator) {
     try {
       throw new Error();
-      $ERROR('This code is unreachable.');
+      throw new Test262Error('This code is unreachable.');
     } catch (err) {
       i++;
       yield;
diff --git a/test/language/statements/for-of/yield-star-from-catch.js b/test/language/statements/for-of/yield-star-from-catch.js
index 6fe33b7f6e..0ae842ecfc 100644
--- a/test/language/statements/for-of/yield-star-from-catch.js
+++ b/test/language/statements/for-of/yield-star-from-catch.js
@@ -17,7 +17,7 @@ var controlIterator = (function*() {
   for (var x of dataIterator) {
     try {
       throw new Error();
-      $ERROR('This code is unreachable.');
+      throw new Test262Error('This code is unreachable.');
     } catch (err) {
       i++;
       yield * values();
diff --git a/test/language/statements/for/S12.6.3_A1.js b/test/language/statements/for/S12.6.3_A1.js
index ebf035605d..c268318f77 100644
--- a/test/language/statements/for/S12.6.3_A1.js
+++ b/test/language/statements/for/S12.6.3_A1.js
@@ -20,7 +20,7 @@ try {
 }
 } catch (e) {
 	if (e !== 1) {
-		$ERROR('#1: for {;;} is admitted and leads to infinite loop');
+		throw new Test262Error('#1: for {;;} is admitted and leads to infinite loop');
 	}
 }
 //
@@ -29,7 +29,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__in__for !== 101) {
-	$ERROR('#2: __in__for === 101. Actual:  __in__for ==='+ __in__for  );
+	throw new Test262Error('#2: __in__for === 101. Actual:  __in__for ==='+ __in__for  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for/S12.6.3_A10.1_T1.js b/test/language/statements/for/S12.6.3_A10.1_T1.js
index 5cf7aafb0f..110adf1fa3 100644
--- a/test/language/statements/for/S12.6.3_A10.1_T1.js
+++ b/test/language/statements/for/S12.6.3_A10.1_T1.js
@@ -15,7 +15,7 @@ flags: [noStrict]
 try {
 	__in__deepest__loop=__in__deepest__loop;
 } catch (e) {
-	$ERROR('#1: "__in__deepest__loop=__in__deepest__loop" does not lead to throwing exception');
+	throw new Test262Error('#1: "__in__deepest__loop=__in__deepest__loop" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ try {
 try {
 	index0=index0;
 } catch (e) {
-	$ERROR('#2: "index0=index0" does not lead to throwing exception');
+	throw new Test262Error('#2: "index0=index0" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -35,7 +35,7 @@ try {
 try {
 	index1=index1;
 } catch (e) {
-	$ERROR('#3: "index1=index1" does not lead to throwing exception');
+	throw new Test262Error('#3: "index1=index1" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -45,7 +45,7 @@ try {
 try {
 	index4=index4;
 } catch (e) {
-	$ERROR('#4: "index4=index4" does not lead to throwing exception');
+	throw new Test262Error('#4: "index4=index4" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -55,7 +55,7 @@ try {
 try {
 	index5=index5;
 } catch (e) {
-	$ERROR('#4: "index5=index5" does not lead to throwing exception');
+	throw new Test262Error('#4: "index5=index5" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -65,7 +65,7 @@ try {
 try {
 	index7=index7;
 } catch (e) {
-	$ERROR('#6: "index7=index7" does not lead to throwing exception');
+	throw new Test262Error('#6: "index7=index7" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -75,7 +75,7 @@ try {
 try {
 	index8=index8;
 } catch (e) {
-	$ERROR('#7: "index8=index8" does not lead to throwing exception');
+	throw new Test262Error('#7: "index8=index8" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -106,7 +106,7 @@ for( var index0=0; index0<=1; index0++) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__str!== "000000000\n100000000\n110000000\n110000001\n111000000\n111000001\n111100000\n111100001\n111110000\n111110001\n111111000\n111111001\n111111100\n111111101\n111111110\n111111111\n") {
-	$ERROR('#2: __str === "000000000\\n100000000\\n110000000\\n110000001\\n111000000\\n111000001\\n111100000\\n111100001\\n111110000\\n111110001\\n111111000\\n111111001\\n111111100\\n111111101\\n111111110\\n111111111\\n". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#2: __str === "000000000\\n100000000\\n110000000\\n110000001\\n111000000\\n111000001\\n111100000\\n111100001\\n111110000\\n111110001\\n111111000\\n111111001\\n111111100\\n111111101\\n111111110\\n111111111\\n". Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for/S12.6.3_A10.1_T2.js b/test/language/statements/for/S12.6.3_A10.1_T2.js
index 10dec59efc..f17185fefd 100644
--- a/test/language/statements/for/S12.6.3_A10.1_T2.js
+++ b/test/language/statements/for/S12.6.3_A10.1_T2.js
@@ -16,7 +16,7 @@ var __str, index2, index3, index6;
 try {
 	__in__deepest__loop=__in__deepest__loop;
 } catch (e) {
-	$ERROR('#1: "__in__deepest__loop=__in__deepest__loop" does not lead to throwing exception');
+	throw new Test262Error('#1: "__in__deepest__loop=__in__deepest__loop" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -26,7 +26,7 @@ try {
 try {
 	index0=index0;
 } catch (e) {
-	$ERROR('#2: "index0=index0" does not lead to throwing exception');
+	throw new Test262Error('#2: "index0=index0" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -36,7 +36,7 @@ try {
 try {
 	index1=index1;
 } catch (e) {
-	$ERROR('#3: "index1=index1" does not lead to throwing exception');
+	throw new Test262Error('#3: "index1=index1" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -46,7 +46,7 @@ try {
 try {
 	index4=index4;
 } catch (e) {
-	$ERROR('#4: "index4=index4" does not lead to throwing exception');
+	throw new Test262Error('#4: "index4=index4" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -56,7 +56,7 @@ try {
 try {
 	index5=index5;
 } catch (e) {
-	$ERROR('#4: "index5=index5" does not lead to throwing exception');
+	throw new Test262Error('#4: "index5=index5" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -66,7 +66,7 @@ try {
 try {
 	index7=index7;
 } catch (e) {
-	$ERROR('#6: "index7=index7" does not lead to throwing exception');
+	throw new Test262Error('#6: "index7=index7" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -76,7 +76,7 @@ try {
 try {
 	index8=index8;
 } catch (e) {
-	$ERROR('#7: "index8=index8" does not lead to throwing exception');
+	throw new Test262Error('#7: "index8=index8" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -107,7 +107,7 @@ for( var index0=0; index0<=1; index0++) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__str!== "000000000\n100000000\n110000000\n110000001\n111000000\n111000001\n111100000\n111100001\n111110000\n111110001\n111111000\n111111001\n111111100\n111111101\n111111110\n111111111\n") {
-	$ERROR('#2: __str === "000000000\\n100000000\\n110000000\\n110000001\\n111000000\\n111000001\\n111100000\\n111100001\\n111110000\\n111110001\\n111111000\\n111111001\\n111111100\\n111111101\\n111111110\\n111111111\\n". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#2: __str === "000000000\\n100000000\\n110000000\\n110000001\\n111000000\\n111000001\\n111100000\\n111100001\\n111110000\\n111110001\\n111111000\\n111111001\\n111111100\\n111111101\\n111111110\\n111111111\\n". Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for/S12.6.3_A10_T1.js b/test/language/statements/for/S12.6.3_A10_T1.js
index 458c360347..0cdab0a275 100644
--- a/test/language/statements/for/S12.6.3_A10_T1.js
+++ b/test/language/statements/for/S12.6.3_A10_T1.js
@@ -15,7 +15,7 @@ flags: [noStrict]
 try {
 	__in__deepest__loop=__in__deepest__loop;
 } catch (e) {
-	$ERROR('#1: "__in__deepest__loop=__in__deepest__loop" does not lead to throwing exception');
+	throw new Test262Error('#1: "__in__deepest__loop=__in__deepest__loop" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -46,7 +46,7 @@ for( index0=0; index0<=1; index0++) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__str!== "000000000\n100000000\n110000000\n110000001\n111000000\n111000001\n111100000\n111100001\n111110000\n111110001\n111111000\n111111001\n111111100\n111111101\n111111110\n111111111\n") {
-	$ERROR('#2: __str === "000000000\\n100000000\\n110000000\\n110000001\\n111000000\\n111000001\\n111100000\\n111100001\\n111110000\\n111110001\\n111111000\\n111111001\\n111111100\\n111111101\\n111111110\\n111111111\\n". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#2: __str === "000000000\\n100000000\\n110000000\\n110000001\\n111000000\\n111000001\\n111100000\\n111100001\\n111110000\\n111110001\\n111111000\\n111111001\\n111111100\\n111111101\\n111111110\\n111111111\\n". Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for/S12.6.3_A10_T2.js b/test/language/statements/for/S12.6.3_A10_T2.js
index 6b4743e792..51d68eb7f9 100644
--- a/test/language/statements/for/S12.6.3_A10_T2.js
+++ b/test/language/statements/for/S12.6.3_A10_T2.js
@@ -16,7 +16,7 @@ var __str, index0, index1, index2, index3, index4, index5, index6, index7, index
 try {
 	__in__deepest__loop=__in__deepest__loop;
 } catch (e) {
-	$ERROR('#1: "__in__deepest__loop=__in__deepest__loop" does not lead to throwing exception');
+	throw new Test262Error('#1: "__in__deepest__loop=__in__deepest__loop" does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -47,7 +47,7 @@ for( index0=0; index0<=1; index0++) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__str!== "000000000\n100000000\n110000000\n110000001\n111000000\n111000001\n111100000\n111100001\n111110000\n111110001\n111111000\n111111001\n111111100\n111111101\n111111110\n111111111\n") {
-	$ERROR('#2: __str === "000000000\\n100000000\\n110000000\\n110000001\\n111000000\\n111000001\\n111100000\\n111100001\\n111110000\\n111110001\\n111111000\\n111111001\\n111111100\\n111111101\\n111111110\\n111111111\\n". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#2: __str === "000000000\\n100000000\\n110000000\\n110000001\\n111000000\\n111000001\\n111100000\\n111100001\\n111110000\\n111110001\\n111111000\\n111111001\\n111111100\\n111111101\\n111111110\\n111111111\\n". Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for/S12.6.3_A11.1_T1.js b/test/language/statements/for/S12.6.3_A11.1_T1.js
index 83064521ee..cd437ba737 100644
--- a/test/language/statements/for/S12.6.3_A11.1_T1.js
+++ b/test/language/statements/for/S12.6.3_A11.1_T1.js
@@ -19,5 +19,5 @@ for(var index=0; index<10; index+=1) {
 }
 
 if (__str!=="56789") {
-	$ERROR('#1: __str === "56789". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#1: __str === "56789". Actual:  __str ==='+ __str  );
 }
diff --git a/test/language/statements/for/S12.6.3_A11.1_T2.js b/test/language/statements/for/S12.6.3_A11.1_T2.js
index 29c7ed89c8..1ad91b5810 100644
--- a/test/language/statements/for/S12.6.3_A11.1_T2.js
+++ b/test/language/statements/for/S12.6.3_A11.1_T2.js
@@ -23,7 +23,7 @@ outer : for(var index=0; index<4; index+=1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__str !== "001011202122303133") {
-	$ERROR('#1: __str === "001011202122303133". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#1: __str === "001011202122303133". Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -39,7 +39,7 @@ outer : for(var index=0; index<4; index+=1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__str !== "0010112021223031") {
-	$ERROR('#2: __str === "0010112021223031". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#2: __str === "0010112021223031". Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -56,7 +56,7 @@ outer : for(var index=0; index<4; index+=1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__str !== "001011202122303133") {
-	$ERROR('#3: __str === "001011202122303133". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#3: __str === "001011202122303133". Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for/S12.6.3_A11_T1.js b/test/language/statements/for/S12.6.3_A11_T1.js
index 39530ade30..ef20ba1dd9 100644
--- a/test/language/statements/for/S12.6.3_A11_T1.js
+++ b/test/language/statements/for/S12.6.3_A11_T1.js
@@ -19,5 +19,5 @@ for(index=0; index<10; index+=1) {
 }
 
 if (__str!=="56789") {
-	$ERROR('#1: __str === "56789". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#1: __str === "56789". Actual:  __str ==='+ __str  );
 }
diff --git a/test/language/statements/for/S12.6.3_A11_T2.js b/test/language/statements/for/S12.6.3_A11_T2.js
index 27d674dc53..02c24b418a 100644
--- a/test/language/statements/for/S12.6.3_A11_T2.js
+++ b/test/language/statements/for/S12.6.3_A11_T2.js
@@ -23,7 +23,7 @@ outer : for(index=0; index<4; index+=1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__str !== "001011202122303133") {
-	$ERROR('#1: __str === "001011202122303133". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#1: __str === "001011202122303133". Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -39,7 +39,7 @@ outer : for(index=0; index<4; index+=1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__str !== "0010112021223031") {
-	$ERROR('#2: __str === "0010112021223031". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#2: __str === "0010112021223031". Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -56,7 +56,7 @@ outer : for(index=0; index<4; index+=1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__str !== "001011202122303133") {
-	$ERROR('#3: __str === "001011202122303133". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#3: __str === "001011202122303133". Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for/S12.6.3_A12.1_T1.js b/test/language/statements/for/S12.6.3_A12.1_T1.js
index 291ed67577..54a18fcd9d 100644
--- a/test/language/statements/for/S12.6.3_A12.1_T1.js
+++ b/test/language/statements/for/S12.6.3_A12.1_T1.js
@@ -19,5 +19,5 @@ for(var index=0; index<10; index+=1) {
 }
 
 if (__str!=="012345") {
-	$ERROR('#1: __str === "012345". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#1: __str === "012345". Actual:  __str ==='+ __str  );
 }
diff --git a/test/language/statements/for/S12.6.3_A12.1_T2.js b/test/language/statements/for/S12.6.3_A12.1_T2.js
index 35f941ce3e..b8bfb526f8 100644
--- a/test/language/statements/for/S12.6.3_A12.1_T2.js
+++ b/test/language/statements/for/S12.6.3_A12.1_T2.js
@@ -23,7 +23,7 @@ outer : for(var index=0; index<4; index+=1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__str !== "00101120213031") {
-	$ERROR('#1: __str === "00101120213031". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#1: __str === "00101120213031". Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -40,7 +40,7 @@ outer : for(var index=0; index<4; index+=1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__str !== "0010112021") {
-	$ERROR('#2: __str === "0010112021". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#2: __str === "0010112021". Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -57,7 +57,7 @@ outer : for(var index=0; index<4; index+=1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__str !== "00101120213031") {
-	$ERROR('#3: __str === "00101120213031". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#3: __str === "00101120213031". Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for/S12.6.3_A12_T1.js b/test/language/statements/for/S12.6.3_A12_T1.js
index abb46eeb10..df25586ae5 100644
--- a/test/language/statements/for/S12.6.3_A12_T1.js
+++ b/test/language/statements/for/S12.6.3_A12_T1.js
@@ -19,5 +19,5 @@ for(index=0; index<10; index+=1) {
 }
 
 if (__str!=="012345") {
-	$ERROR('#1:__str === "012345". Actual: __str ==='+__str  );
+	throw new Test262Error('#1:__str === "012345". Actual: __str ==='+__str  );
 }
diff --git a/test/language/statements/for/S12.6.3_A12_T2.js b/test/language/statements/for/S12.6.3_A12_T2.js
index bddc610612..04ca9828a0 100644
--- a/test/language/statements/for/S12.6.3_A12_T2.js
+++ b/test/language/statements/for/S12.6.3_A12_T2.js
@@ -23,7 +23,7 @@ outer : for(index=0; index<4; index+=1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__str !== "00101120213031") {
-	$ERROR('#1: __str === "00101120213031". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#1: __str === "00101120213031". Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -40,7 +40,7 @@ outer : for(index=0; index<4; index+=1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__str !== "0010112021") {
-	$ERROR('#2: __str === "0010112021". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#2: __str === "0010112021". Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -57,7 +57,7 @@ outer : for(index=0; index<4; index+=1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__str !== "00101120213031") {
-	$ERROR('#3: __str === "00101120213031". Actual:  __str ==='+ __str  );
+	throw new Test262Error('#3: __str === "00101120213031". Actual:  __str ==='+ __str  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for/S12.6.3_A13.js b/test/language/statements/for/S12.6.3_A13.js
index 6a7cbede32..c824502be5 100644
--- a/test/language/statements/for/S12.6.3_A13.js
+++ b/test/language/statements/for/S12.6.3_A13.js
@@ -14,7 +14,7 @@ description: Declaring variable in "for" ExpressionNoIn
 try {
 	index = index;
 } catch (e) {
-	$ERROR('#1: VariableDeclaration in "var VariableDeclarationListNoIn" of for IterationStatement is allowed');
+	throw new Test262Error('#1: VariableDeclaration in "var VariableDeclarationListNoIn" of for IterationStatement is allowed');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for/S12.6.3_A14.js b/test/language/statements/for/S12.6.3_A14.js
index 48970d9625..d4ae23763d 100644
--- a/test/language/statements/for/S12.6.3_A14.js
+++ b/test/language/statements/for/S12.6.3_A14.js
@@ -11,36 +11,36 @@ description: Using +,*,/, as the second Expression
 
 //CHECK#1
 for(var i=0;i<10;i++){}
-if (i!==10)	$ERROR('#1: i === 10. Actual:  i ==='+ i  );
+if (i!==10)	throw new Test262Error('#1: i === 10. Actual:  i ==='+ i  );
 
 //CHECK#2
 var j=0;
 for(var i=1;i<10;i*=2){
 	j++;
 }
-if (i!==16)  $ERROR('#2.1: i === 16. Actual:  i ==='+ i  );
-if (j!==4)  $ERROR('#2.2: j === 4. Actual:  j ==='+ j  );
+if (i!==16)  throw new Test262Error('#2.1: i === 16. Actual:  i ==='+ i  );
+if (j!==4)  throw new Test262Error('#2.2: j === 4. Actual:  j ==='+ j  );
 
 //CHECK#3
 var j=0;
 for(var i=16;i>1;i=i/2){
   j++;
 }
-if (i!==1)  $ERROR('#3.1: i === 1. Actual:  i ==='+ i  );
-if (j!==4)  $ERROR('#3.2: j === 4. Actual:  j ==='+ j  );
+if (i!==1)  throw new Test262Error('#3.1: i === 1. Actual:  i ==='+ i  );
+if (j!==4)  throw new Test262Error('#3.2: j === 4. Actual:  j ==='+ j  );
 
 //CHECK#4
 var j=0;
 for(var i=10;i>1;i--){
   j++;
 }
-if (i!==1)  $ERROR('#4.1: i === 1. Actual:  i ==='+ i  );
-if (j!==9)  $ERROR('#4.2: j === 9. Actual:  j ==='+ j  );
+if (i!==1)  throw new Test262Error('#4.1: i === 1. Actual:  i ==='+ i  );
+if (j!==9)  throw new Test262Error('#4.2: j === 9. Actual:  j ==='+ j  );
 
 //CHECK#5
 var j=0;
 for(var i=2;i<10;i*=i){
   j++;
 }
-if (i!==16)  $ERROR('#5.1: i === 16. Actual:  i ==='+ i  );
-if (j!==2)  $ERROR('#5.2: j === 2. Actual:  j ==='+ j  );
+if (i!==16)  throw new Test262Error('#5.1: i === 16. Actual:  i ==='+ i  );
+if (j!==2)  throw new Test262Error('#5.2: j === 2. Actual:  j ==='+ j  );
diff --git a/test/language/statements/for/S12.6.3_A15.js b/test/language/statements/for/S12.6.3_A15.js
index 4ba7f0519b..6e2ec3b3fb 100644
--- a/test/language/statements/for/S12.6.3_A15.js
+++ b/test/language/statements/for/S12.6.3_A15.js
@@ -14,10 +14,10 @@ for(var i=0;i<10;i++){
 	i*=2;
   break;	
 }
-if (i!==0)  $ERROR('#1: i === 0. Actual:  i ==='+ i  );
+if (i!==0)  throw new Test262Error('#1: i === 0. Actual:  i ==='+ i  );
 
 //CHECK#2
 for(var i=0;i<10;i++){
   i*=2;
-  if (i===3)  $ERROR('#2: i !== 3');
+  if (i===3)  throw new Test262Error('#2: i !== 3');
 }
diff --git a/test/language/statements/for/S12.6.3_A2.1.js b/test/language/statements/for/S12.6.3_A2.1.js
index 9b1604407e..6c26c5c07c 100644
--- a/test/language/statements/for/S12.6.3_A2.1.js
+++ b/test/language/statements/for/S12.6.3_A2.1.js
@@ -15,10 +15,10 @@ try {
 	for((function(){throw "NoInExpression"})(); ;(function(){throw "SecondExpression"})()) {
 		throw "Statement";
 	}
-	$ERROR('#1: (function(){throw "NoInExpression"})() lead to throwing exception');
+	throw new Test262Error('#1: (function(){throw "NoInExpression"})() lead to throwing exception');
 } catch (e) {
 	if (e !== "NoInExpression") {
-		$ERROR('#2: When for (ExpressionNoIn ;  ; Expression) Statement is evaluated NoInExpression evaluates first');
+		throw new Test262Error('#2: When for (ExpressionNoIn ;  ; Expression) Statement is evaluated NoInExpression evaluates first');
 	}
 }
 //
diff --git a/test/language/statements/for/S12.6.3_A2.2.js b/test/language/statements/for/S12.6.3_A2.2.js
index 357e2cf3b5..4c614def22 100644
--- a/test/language/statements/for/S12.6.3_A2.2.js
+++ b/test/language/statements/for/S12.6.3_A2.2.js
@@ -15,10 +15,10 @@ try {
 	for((function(){throw "NoInExpression"})();;) {
 		throw "Statement";
 	}
-	$ERROR('#1: (function(){throw "NoInExpression"})() lead to throwing exception');
+	throw new Test262Error('#1: (function(){throw "NoInExpression"})() lead to throwing exception');
 } catch (e) {
 	if (e !== "NoInExpression") {
-		$ERROR('#1: When for (ExpressionNoIn ;  ; ) Statement is evaluated NoInExpression evaluates first');
+		throw new Test262Error('#1: When for (ExpressionNoIn ;  ; ) Statement is evaluated NoInExpression evaluates first');
 	}
 }
 //
diff --git a/test/language/statements/for/S12.6.3_A2.js b/test/language/statements/for/S12.6.3_A2.js
index a56f6a2439..7a70544e13 100644
--- a/test/language/statements/for/S12.6.3_A2.js
+++ b/test/language/statements/for/S12.6.3_A2.js
@@ -15,10 +15,10 @@ try {
 	for((function(){throw "NoInExpression";})(); (function(){throw "FirstExpression";})(); (function(){throw "SecondExpression";})()) {
 		var in_for = "reached";
 	}
-	$ERROR('#1: (function(){throw "NoInExpression";})() lead to throwing exception');
+	throw new Test262Error('#1: (function(){throw "NoInExpression";})() lead to throwing exception');
 } catch (e) {
 	if (e !== "NoInExpression") {
-		$ERROR('#1: When for (ExpressionNoIn ; Expression ; Expression) Statement is evaluated ExpressionNoIn evaluates first');
+		throw new Test262Error('#1: When for (ExpressionNoIn ; Expression ; Expression) Statement is evaluated ExpressionNoIn evaluates first');
 	}
 }
 //
@@ -27,7 +27,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (in_for !== undefined) {
-	$ERROR('#2: in_for === undefined. Actual:  in_for ==='+ in_for  );
+	throw new Test262Error('#2: in_for === undefined. Actual:  in_for ==='+ in_for  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for/S12.6.3_A3.js b/test/language/statements/for/S12.6.3_A3.js
index fa4da463dc..430642c62a 100644
--- a/test/language/statements/for/S12.6.3_A3.js
+++ b/test/language/statements/for/S12.6.3_A3.js
@@ -18,10 +18,10 @@ try {
 	for((function(){__in__NotInExpression__ = "checked";__in__NotInExpression__2 = "passed";})(); (function(){throw "FirstExpression"})(); (function(){throw "SecondExpression"})()) {
 		__in__for="reached";
 	}
-	$ERROR('#1: (function(){throw "SecondExpression"} lead to throwing exception');
+	throw new Test262Error('#1: (function(){throw "SecondExpression"} lead to throwing exception');
 } catch (e) {
 	if (e !== "FirstExpression") {
-		$ERROR('#1: When for (ExpressionNoIn ; FirstExpression ; SecondExpression) Statement is evaluated first evaluates ExpressionNoIn then FirstExpression');
+		throw new Test262Error('#1: When for (ExpressionNoIn ; FirstExpression ; SecondExpression) Statement is evaluated first evaluates ExpressionNoIn then FirstExpression');
 	}
 }
 //
@@ -30,7 +30,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if ((__in__NotInExpression__ !== "checked")&(__in__NotInExpression__2!=="passed")) {
-	$ERROR('#2: (__in__NotInExpression__ === "checked")&(__in__NotInExpression__2==="passed")');
+	throw new Test262Error('#2: (__in__NotInExpression__ === "checked")&(__in__NotInExpression__2==="passed")');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -38,7 +38,7 @@ if ((__in__NotInExpression__ !== "checked")&(__in__NotInExpression__2!=="passed"
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (typeof __in__for !== "undefined") {
-	$ERROR('#3: typeof __in__for === "undefined". Actual:  typeof __in__for ==='+ typeof __in__for  );
+	throw new Test262Error('#3: typeof __in__for === "undefined". Actual:  typeof __in__for ==='+ typeof __in__for  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for/S12.6.3_A5.js b/test/language/statements/for/S12.6.3_A5.js
index 32b2ec4877..7fd1c39aa7 100644
--- a/test/language/statements/for/S12.6.3_A5.js
+++ b/test/language/statements/for/S12.6.3_A5.js
@@ -19,7 +19,7 @@ i = 1;
 try {
 	for(eval("i in arr");1;) {break;};	
 } catch (e) {	
-		$ERROR('#1.1: for(eval("i in arr");1;) {break;}; does not lead to throwing exception');	
+		throw new Test262Error('#1.1: for(eval("i in arr");1;) {break;}; does not lead to throwing exception');	
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -29,7 +29,7 @@ try {
 try {
 	for(eval("var i = 1 in arr");1;) {break;};	
 } catch (e) {	
-		$ERROR('#2.1: for(eval("var i = 1 in arr");1;) {break;}; does not lead to throwing exception');	
+		throw new Test262Error('#2.1: for(eval("var i = 1 in arr");1;) {break;}; does not lead to throwing exception');	
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -39,7 +39,7 @@ try {
 try {
 	for(eval("1 in arr");1;) {break;};
 } catch (e) {	
-		$ERROR('#3.1: for(eval("1 in arr");1;) {break;}; does not lead to throwing exception');	
+		throw new Test262Error('#3.1: for(eval("1 in arr");1;) {break;}; does not lead to throwing exception');	
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/for/S12.6.3_A6.js b/test/language/statements/for/S12.6.3_A6.js
index 827f60522e..52c9f19c23 100644
--- a/test/language/statements/for/S12.6.3_A6.js
+++ b/test/language/statements/for/S12.6.3_A6.js
@@ -15,10 +15,10 @@ try {
 	for(;;(function(){throw "SecondExpression";})()){
         var __in__for = "reached";
     }
-    $ERROR('#1: (function(){throw "SecondExpression"}() lead to throwing exception');
+    throw new Test262Error('#1: (function(){throw "SecondExpression"}() lead to throwing exception');
 } catch (e) {
 	if (e !== "SecondExpression") {
-		$ERROR('#1: When for ( ;  ; Expression) Statement is evaluated Statement evaluates first then Expression evaluates');
+		throw new Test262Error('#1: When for ( ;  ; Expression) Statement is evaluated Statement evaluates first then Expression evaluates');
 	}
 }
 //
@@ -27,7 +27,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__in__for !== "reached") {
-	$ERROR('#2: __in__for === "reached". Actual:  __in__for ==='+ __in__for  );
+	throw new Test262Error('#2: __in__for === "reached". Actual:  __in__for ==='+ __in__for  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S10.1.1_A1_T1.js b/test/language/statements/function/S10.1.1_A1_T1.js
index a630aec8cf..855226cf90 100644
--- a/test/language/statements/function/S10.1.1_A1_T1.js
+++ b/test/language/statements/function/S10.1.1_A1_T1.js
@@ -14,4 +14,4 @@ function f1(){
   return 1;
 }
 if(typeof(f1)!=="function")
-  $ERROR('#1: typeof(f1)!=="function"');
+  throw new Test262Error('#1: typeof(f1)!=="function"');
diff --git a/test/language/statements/function/S13.2.1_A4_T1.js b/test/language/statements/function/S13.2.1_A4_T1.js
index 1a72e03812..b0e7a4e8f5 100644
--- a/test/language/statements/function/S13.2.1_A4_T1.js
+++ b/test/language/statements/function/S13.2.1_A4_T1.js
@@ -21,7 +21,7 @@ __func(__obj);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__obj.foo !== 7) {
-	$ERROR('#1: __obj.foo === 7. Actual: __obj.foo ==='+__obj.foo);
+	throw new Test262Error('#1: __obj.foo === 7. Actual: __obj.foo ==='+__obj.foo);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.1_A4_T2.js b/test/language/statements/function/S13.2.1_A4_T2.js
index 71b7f40e28..81c494c882 100644
--- a/test/language/statements/function/S13.2.1_A4_T2.js
+++ b/test/language/statements/function/S13.2.1_A4_T2.js
@@ -21,7 +21,7 @@ var __obj={};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__obj.foo !== "whiskey gogo") {
-	$ERROR('#1: __obj.foo === "whiskey gogo". Actual: __obj.foo ==='+__obj.foo);
+	throw new Test262Error('#1: __obj.foo === "whiskey gogo". Actual: __obj.foo ==='+__obj.foo);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.1_A4_T3.js b/test/language/statements/function/S13.2.1_A4_T3.js
index 43b96bf909..cc883ba218 100644
--- a/test/language/statements/function/S13.2.1_A4_T3.js
+++ b/test/language/statements/function/S13.2.1_A4_T3.js
@@ -21,7 +21,7 @@ __func(__obj);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__obj.PI !== 3.14) {
-	$ERROR('#1: __obj.PI === 3.14. Actual: __obj.PI ==='+__obj.PI);
+	throw new Test262Error('#1: __obj.PI === 3.14. Actual: __obj.PI ==='+__obj.PI);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.1_A4_T4.js b/test/language/statements/function/S13.2.1_A4_T4.js
index af31061ecd..01cba86983 100644
--- a/test/language/statements/function/S13.2.1_A4_T4.js
+++ b/test/language/statements/function/S13.2.1_A4_T4.js
@@ -21,7 +21,7 @@ __func(__obj);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__obj.E !== 2.74) {
-	$ERROR('#1: __obj.E === 2.74. Actual: __obj.E ==='+__obj.E);
+	throw new Test262Error('#1: __obj.E === 2.74. Actual: __obj.E ==='+__obj.E);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.1_A5_T1.js b/test/language/statements/function/S13.2.1_A5_T1.js
index b8abe035a1..73724d90ad 100644
--- a/test/language/statements/function/S13.2.1_A5_T1.js
+++ b/test/language/statements/function/S13.2.1_A5_T1.js
@@ -21,7 +21,7 @@ __arr.sort(
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__arr.toString() !== [4,4,4,3,3,3,2,2,2,1,1,1].toString()) {
-	$ERROR('#1: __arr.toString() === [4,4,4,3,3,3,2,2,2,1,1,1].toString(). Actual: __arr.toString() ==='+__arr.toString());
+	throw new Test262Error('#1: __arr.toString() === [4,4,4,3,3,3,2,2,2,1,1,1].toString(). Actual: __arr.toString() ==='+__arr.toString());
 }
 
 //
diff --git a/test/language/statements/function/S13.2.1_A5_T2.js b/test/language/statements/function/S13.2.1_A5_T2.js
index be5177144a..6e08e825f5 100644
--- a/test/language/statements/function/S13.2.1_A5_T2.js
+++ b/test/language/statements/function/S13.2.1_A5_T2.js
@@ -20,7 +20,7 @@ function derivative(f, dx) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (Math.abs(derivative(Math.sin, 0.0001)(0) - derivative(Math.sin, 0.0001)(2*Math.PI)) >= 1/65536.0) {
-	$ERROR('#1: Math.abs(derivative(Math.sin, 0.0001)(0) - derivative(Math.sin, 0.0001)(2*Math.PI)) <= 1/65536.0');
+	throw new Test262Error('#1: Math.abs(derivative(Math.sin, 0.0001)(0) - derivative(Math.sin, 0.0001)(2*Math.PI)) <= 1/65536.0');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.1_A6_T1.js b/test/language/statements/function/S13.2.1_A6_T1.js
index 6e51aa8fe2..700be5c4e8 100644
--- a/test/language/statements/function/S13.2.1_A6_T1.js
+++ b/test/language/statements/function/S13.2.1_A6_T1.js
@@ -24,7 +24,7 @@ __func(y,b);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (x!==1 || y!==2 || a!=="AB" || b!=="SAM") {
-	$ERROR('#1: x === 1 and y === 2 and a === "AB" and b === "SAM". Actual: x ==='+x+' and y ==='+y+' and a ==='+a+' and b ==='+b);
+	throw new Test262Error('#1: x === 1 and y === 2 and a === "AB" and b === "SAM". Actual: x ==='+x+' and y ==='+y+' and a ==='+a+' and b ==='+b);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.1_A6_T2.js b/test/language/statements/function/S13.2.1_A6_T2.js
index 78f562d500..a05ce9f0af 100644
--- a/test/language/statements/function/S13.2.1_A6_T2.js
+++ b/test/language/statements/function/S13.2.1_A6_T2.js
@@ -24,7 +24,7 @@ __func(y,b);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (x!==1 || y!==2 || a!=="AB" || b!=="SAM") {
-	$ERROR('#1: x === 1 and y === 2 and a === "AB" and b === "SAM". Actual: x ==='+x+' and y ==='+y+' and a ==='+a+' and b ==='+b);
+	throw new Test262Error('#1: x === 1 and y === 2 and a === "AB" and b === "SAM". Actual: x ==='+x+' and y ==='+y+' and a ==='+a+' and b ==='+b);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.1_A6_T3.js b/test/language/statements/function/S13.2.1_A6_T3.js
index 6f7ca5fbc1..750316de40 100644
--- a/test/language/statements/function/S13.2.1_A6_T3.js
+++ b/test/language/statements/function/S13.2.1_A6_T3.js
@@ -25,7 +25,7 @@ __func(y,b);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (x!==1 || y!==2 || a!=="AB" || b!=="SAM") {
-	$ERROR('#1: x === 1 and y === 2 and a === "AB" and b === "SAM". Actual: x ==='+x+' and y ==='+y+' and a ==='+a+' and b ==='+b);
+	throw new Test262Error('#1: x === 1 and y === 2 and a === "AB" and b === "SAM". Actual: x ==='+x+' and y ==='+y+' and a ==='+a+' and b ==='+b);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.1_A6_T4.js b/test/language/statements/function/S13.2.1_A6_T4.js
index e3a6cd749b..2c30fdadbc 100644
--- a/test/language/statements/function/S13.2.1_A6_T4.js
+++ b/test/language/statements/function/S13.2.1_A6_T4.js
@@ -25,7 +25,7 @@ __func(y,b);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (x!==1 || y!==2 || a!=="AB" || b!=="SAM") {
-	$ERROR('#1: x === 1 and y === 2 and a === "AB" and b === "SAM". Actual: x ==='+x+' and y ==='+y+' and a ==='+a+' and b ==='+b);
+	throw new Test262Error('#1: x === 1 and y === 2 and a === "AB" and b === "SAM". Actual: x ==='+x+' and y ==='+y+' and a ==='+a+' and b ==='+b);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.1_A7_T1.js b/test/language/statements/function/S13.2.1_A7_T1.js
index c9b7227053..c35ea1815a 100644
--- a/test/language/statements/function/S13.2.1_A7_T1.js
+++ b/test/language/statements/function/S13.2.1_A7_T1.js
@@ -20,7 +20,7 @@ function __func(){
 try{
     var x=__func();
 } catch(e){
-    $ERROR('#1: var x=__func() does not lead to throwing exception. Actual: exception is '+e);
+    throw new Test262Error('#1: var x=__func() does not lead to throwing exception. Actual: exception is '+e);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.1_A7_T2.js b/test/language/statements/function/S13.2.1_A7_T2.js
index e3e10cfc7c..fe650a201e 100644
--- a/test/language/statements/function/S13.2.1_A7_T2.js
+++ b/test/language/statements/function/S13.2.1_A7_T2.js
@@ -22,7 +22,7 @@ var __func = function (){
 try{
     var x=__func();
 } catch(e){
-    $ERROR('#1: var x=__func() does not lead to throwing exception. Actual: exception is '+e);
+    throw new Test262Error('#1: var x=__func() does not lead to throwing exception. Actual: exception is '+e);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.1_A7_T3.js b/test/language/statements/function/S13.2.1_A7_T3.js
index 8ecaa8ae34..0afbc25392 100644
--- a/test/language/statements/function/S13.2.1_A7_T3.js
+++ b/test/language/statements/function/S13.2.1_A7_T3.js
@@ -20,7 +20,7 @@ function __func(){
 //CHECK#
 try {
 	x=x;
-	$ERROR('#0: "x=x" lead to throwing exception');
+	throw new Test262Error('#0: "x=x" lead to throwing exception');
 } catch (e) {
     if (e instanceof Test262Error) throw e;
 }
@@ -32,7 +32,7 @@ try {
 try{
     var __x=__func();
 } catch(e){
-    $ERROR('#1: var __x=__func() does not lead to throwing exception. Actual: exception is '+e);
+    throw new Test262Error('#1: var __x=__func() does not lead to throwing exception. Actual: exception is '+e);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -40,7 +40,7 @@ try{
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__x !== 1) {
-	$ERROR('#2: __x === 1. Actual: __x ==='+__x);
+	throw new Test262Error('#2: __x === 1. Actual: __x ==='+__x);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -48,7 +48,7 @@ if (__x !== 1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (x !== 1) {
-	$ERROR('#3: x === 1. Actual: x ==='+x);
+	throw new Test262Error('#3: x === 1. Actual: x ==='+x);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.1_A7_T4.js b/test/language/statements/function/S13.2.1_A7_T4.js
index b5a5c0f06c..963a294f7d 100644
--- a/test/language/statements/function/S13.2.1_A7_T4.js
+++ b/test/language/statements/function/S13.2.1_A7_T4.js
@@ -19,7 +19,7 @@ function __func(){
 //CHECK#
 try {
 	x=x;
-	$ERROR('#0: "x=x" lead to throwing exception');
+	throw new Test262Error('#0: "x=x" lead to throwing exception');
 } catch (e) {
     if (e instanceof Test262Error) throw e;
 }
@@ -31,7 +31,7 @@ try {
 try{
     var __x=__func()
 } catch(e){
-    $ERROR('#1: var __x=__func() does not lead to throwing exception. Actual: exception is '+e);
+    throw new Test262Error('#1: var __x=__func() does not lead to throwing exception. Actual: exception is '+e);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -39,7 +39,7 @@ try{
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (!(__x)) {
-	$ERROR('#2: __x === true. Actual: __x ==='+__x);
+	throw new Test262Error('#2: __x === true. Actual: __x ==='+__x);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -48,7 +48,7 @@ if (!(__x)) {
 //CHECK#3
 try {
 	x=x;
-	$ERROR('#3: "x=x" lead to throwing exception');
+	throw new Test262Error('#3: "x=x" lead to throwing exception');
 } catch (e) {
     if (e instanceof Test262Error) throw e;
 }
diff --git a/test/language/statements/function/S13.2.1_A8_T1.js b/test/language/statements/function/S13.2.1_A8_T1.js
index 7017b62338..c9f2abe566 100644
--- a/test/language/statements/function/S13.2.1_A8_T1.js
+++ b/test/language/statements/function/S13.2.1_A8_T1.js
@@ -20,9 +20,9 @@ function __func(){
 
 try{
     var x=__func()
-    $ERROR('#0: var x=__func() lead to throwing exception');
+    throw new Test262Error('#0: var x=__func() lead to throwing exception');
 } catch(e){
     if (e !== "Catch Me If You Can") {
-    	$ERROR('#1: Exception === "Catch Me If You Can". Actual: exception ==='+e);
+    	throw new Test262Error('#1: Exception === "Catch Me If You Can". Actual: exception ==='+e);
     }
 }
diff --git a/test/language/statements/function/S13.2.1_A8_T2.js b/test/language/statements/function/S13.2.1_A8_T2.js
index a73821424d..1900a6af9b 100644
--- a/test/language/statements/function/S13.2.1_A8_T2.js
+++ b/test/language/statements/function/S13.2.1_A8_T2.js
@@ -22,9 +22,9 @@ var __func = function (message){
 
 try{
     var x=__func(CATCH_ME_IF_YOU_CAN)
-    $ERROR('#0: var x=__func(CATCH_ME_IF_YOU_CAN) lead to throwing exception');
+    throw new Test262Error('#0: var x=__func(CATCH_ME_IF_YOU_CAN) lead to throwing exception');
 } catch(e){
     if (!e) {
-    	$ERROR('#1: Exception === true. Actual: exception ==='+e);
+    	throw new Test262Error('#1: Exception === true. Actual: exception ==='+e);
     }
 }
diff --git a/test/language/statements/function/S13.2.1_A9.1_T1.js b/test/language/statements/function/S13.2.1_A9.1_T1.js
index 959c0b9c78..960cea2f97 100644
--- a/test/language/statements/function/S13.2.1_A9.1_T1.js
+++ b/test/language/statements/function/S13.2.1_A9.1_T1.js
@@ -20,7 +20,7 @@ function __func(){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func() !== undefined) {
-	$ERROR('#1: __func() === undefined. Actual: __func() ==='+__func());
+	throw new Test262Error('#1: __func() === undefined. Actual: __func() ==='+__func());
 };
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -28,7 +28,7 @@ if (__func() !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (!x) {
-	$ERROR('#2: x === true. Actual: x === '+x);
+	throw new Test262Error('#2: x === true. Actual: x === '+x);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.1_A9.1_T2.js b/test/language/statements/function/S13.2.1_A9.1_T2.js
index cbf3f11679..859216bc02 100644
--- a/test/language/statements/function/S13.2.1_A9.1_T2.js
+++ b/test/language/statements/function/S13.2.1_A9.1_T2.js
@@ -20,7 +20,7 @@ var __func = function(){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func() !== undefined) {
-	$ERROR('#1: __func() === undefined. Actual: __func() ==='+__func());
+	throw new Test262Error('#1: __func() === undefined. Actual: __func() ==='+__func());
 };
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -28,7 +28,7 @@ if (__func() !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (!x) {
-	$ERROR('#2: x === true. Actual: x === '+x);
+	throw new Test262Error('#2: x === true. Actual: x === '+x);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.1_A9_T1.js b/test/language/statements/function/S13.2.1_A9_T1.js
index 9fbccefb67..982a1a71de 100644
--- a/test/language/statements/function/S13.2.1_A9_T1.js
+++ b/test/language/statements/function/S13.2.1_A9_T1.js
@@ -21,7 +21,7 @@ function __func(){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func() !== undefined) {
-	$ERROR('#1: __func() === undefined. Actual: __func() ==='+__func());
+	throw new Test262Error('#1: __func() === undefined. Actual: __func() ==='+__func());
 };
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -29,7 +29,7 @@ if (__func() !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (x!==1) {
-	$ERROR('#2: x === 1. Actual: x === '+x);
+	throw new Test262Error('#2: x === 1. Actual: x === '+x);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.1_A9_T2.js b/test/language/statements/function/S13.2.1_A9_T2.js
index fffeb8f176..fa4afe96be 100644
--- a/test/language/statements/function/S13.2.1_A9_T2.js
+++ b/test/language/statements/function/S13.2.1_A9_T2.js
@@ -21,7 +21,7 @@ var __func = function(){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func() !== undefined) {
-	$ERROR('#1: __func() === undefined. Actual: __func() ==='+__func());
+	throw new Test262Error('#1: __func() === undefined. Actual: __func() ==='+__func());
 };
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -29,7 +29,7 @@ if (__func() !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (x!==1) {
-	$ERROR('#2: x === 1. Actual: x === '+x);
+	throw new Test262Error('#2: x === 1. Actual: x === '+x);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A10.js b/test/language/statements/function/S13.2.2_A10.js
index bf3b999958..395d820d86 100644
--- a/test/language/statements/function/S13.2.2_A10.js
+++ b/test/language/statements/function/S13.2.2_A10.js
@@ -24,7 +24,7 @@ function FACTORY(){
 try {
 	var obj = new FACTORY();
 } catch (e) {
-	$ERROR('#1: var obj = new FACTORY() does not lead to throwing exception. Actual: Exception is '+e);
+	throw new Test262Error('#1: var obj = new FACTORY() does not lead to throwing exception. Actual: Exception is '+e);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -32,7 +32,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (obj.id !== 5) {
-	$ERROR('#2: obj.id === 5. Actual: obj.id ==='+obj.id);
+	throw new Test262Error('#2: obj.id === 5. Actual: obj.id ==='+obj.id);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A11.js b/test/language/statements/function/S13.2.2_A11.js
index 5a57a8ef51..c2402ef34b 100644
--- a/test/language/statements/function/S13.2.2_A11.js
+++ b/test/language/statements/function/S13.2.2_A11.js
@@ -25,7 +25,7 @@ function FACTORY(){
 //CHECK#1
 try {
 	var obj = new FACTORY();
-	$ERROR('#1: var obj = new FACTORY() lead to throwing exception');
+	throw new Test262Error('#1: var obj = new FACTORY() lead to throwing exception');
 } catch (e) {
     if (e instanceof Test262Error) throw e;
 }
diff --git a/test/language/statements/function/S13.2.2_A12.js b/test/language/statements/function/S13.2.2_A12.js
index 4e6e924951..e0b103e79f 100644
--- a/test/language/statements/function/S13.2.2_A12.js
+++ b/test/language/statements/function/S13.2.2_A12.js
@@ -26,7 +26,7 @@ function FACTORY(){
 try {
 	var obj = new FACTORY();
 } catch (e) {
-	$ERROR('#1: var obj = new FACTORY() does not lead to throwing exception. Actual: Exception is '+e);
+	throw new Test262Error('#1: var obj = new FACTORY() does not lead to throwing exception. Actual: Exception is '+e);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -34,7 +34,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (obj.id !== "id_string") {
-	$ERROR('#2: obj.id === "id_string". Actual: obj.id ==='+obj.id);
+	throw new Test262Error('#2: obj.id === "id_string". Actual: obj.id ==='+obj.id);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A13.js b/test/language/statements/function/S13.2.2_A13.js
index 49ffdf4c78..04bf7418bd 100644
--- a/test/language/statements/function/S13.2.2_A13.js
+++ b/test/language/statements/function/S13.2.2_A13.js
@@ -23,7 +23,7 @@ function FACTORY(){
 //CHECK#1
 try {
 	var obj = new FACTORY();
-	$ERROR('#1: var obj = new FACTORY() lead to throwing exception');
+	throw new Test262Error('#1: var obj = new FACTORY() lead to throwing exception');
 } catch (e) {
     if (e instanceof Test262Error) throw e;
 }
diff --git a/test/language/statements/function/S13.2.2_A14.js b/test/language/statements/function/S13.2.2_A14.js
index 6e5a2eea16..08afe1025c 100644
--- a/test/language/statements/function/S13.2.2_A14.js
+++ b/test/language/statements/function/S13.2.2_A14.js
@@ -25,7 +25,7 @@ function FACTORY(){
 try {
 	var obj = new FACTORY();
 } catch (e) {
-	$ERROR('#1: var obj = new FACTORY() does not lead to throwing exception');
+	throw new Test262Error('#1: var obj = new FACTORY() does not lead to throwing exception');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A15_T1.js b/test/language/statements/function/S13.2.2_A15_T1.js
index 67a4d6342a..e1978df8f6 100644
--- a/test/language/statements/function/S13.2.2_A15_T1.js
+++ b/test/language/statements/function/S13.2.2_A15_T1.js
@@ -16,7 +16,7 @@ var __obj = new __FACTORY();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof obj !== "undefined") {
-	$ERROR('#1: typeof obj === "undefined". Actual: typeof obj ==='+typeof obj);
+	throw new Test262Error('#1: typeof obj === "undefined". Actual: typeof obj ==='+typeof obj);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -24,7 +24,7 @@ if (typeof obj !== "undefined") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__obj.prop !== "A") {
-	$ERROR('#2: __obj.prop === "A". Actual: __obj.prop ==='+__obj.prop);
+	throw new Test262Error('#2: __obj.prop === "A". Actual: __obj.prop ==='+__obj.prop);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -32,7 +32,7 @@ if (__obj.prop !== "A") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__obj.slot.prop !==1) {
-	$ERROR('#3: __obj.slot.prop ===1. Actual: __obj.slot.prop ==='+__obj.slot.prop);
+	throw new Test262Error('#3: __obj.slot.prop ===1. Actual: __obj.slot.prop ==='+__obj.slot.prop);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A15_T2.js b/test/language/statements/function/S13.2.2_A15_T2.js
index 103de47926..020c6d3dbc 100644
--- a/test/language/statements/function/S13.2.2_A15_T2.js
+++ b/test/language/statements/function/S13.2.2_A15_T2.js
@@ -18,7 +18,7 @@ var __obj = new __FACTORY();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (obj.prop !== "A") {
-	$ERROR('#1: obj.prop === "A". Actual: obj.prop ==='+obj.prop);
+	throw new Test262Error('#1: obj.prop === "A". Actual: obj.prop ==='+obj.prop);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -26,7 +26,7 @@ if (obj.prop !== "A") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__obj.prop !== "A") {
-	$ERROR('#2: __obj.prop === "A". Actual: __obj.prop ==='+__obj.prop);
+	throw new Test262Error('#2: __obj.prop === "A". Actual: __obj.prop ==='+__obj.prop);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -34,7 +34,7 @@ if (__obj.prop !== "A") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__obj.slot.prop !==1) {
-	$ERROR('#3: __obj.slot.prop === 1. Actual: __obj.slot.prop ==='+__obj.slot.prop);
+	throw new Test262Error('#3: __obj.slot.prop === 1. Actual: __obj.slot.prop ==='+__obj.slot.prop);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A15_T3.js b/test/language/statements/function/S13.2.2_A15_T3.js
index 8e8286e59b..bb1fa2e56a 100644
--- a/test/language/statements/function/S13.2.2_A15_T3.js
+++ b/test/language/statements/function/S13.2.2_A15_T3.js
@@ -26,7 +26,7 @@ __obj = new __FACTORY();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof obj !== "undefined") {
-	$ERROR('#1: typeof obj === "undefined". Actual: typeof obj ==='+typeof obj);
+	throw new Test262Error('#1: typeof obj === "undefined". Actual: typeof obj ==='+typeof obj);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -34,7 +34,7 @@ if (typeof obj !== "undefined") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__obj.prop !== "A") {
-	$ERROR('#2: __obj.prop === "A". Actual: __obj.prop ==='+__obj.prop);
+	throw new Test262Error('#2: __obj.prop === "A". Actual: __obj.prop ==='+__obj.prop);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -42,7 +42,7 @@ if (__obj.prop !== "A") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__obj.slot.prop !==1) {
-	$ERROR('#3: __obj.slot.prop ===1. Actual: __obj.slot.prop ==='+__obj.slot.prop);
+	throw new Test262Error('#3: __obj.slot.prop ===1. Actual: __obj.slot.prop ==='+__obj.slot.prop);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A15_T4.js b/test/language/statements/function/S13.2.2_A15_T4.js
index e96a6895f9..5065467aeb 100644
--- a/test/language/statements/function/S13.2.2_A15_T4.js
+++ b/test/language/statements/function/S13.2.2_A15_T4.js
@@ -26,7 +26,7 @@ __obj = new __FACTORY();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (obj.prop !== "A") {
-	$ERROR('#1: obj.prop === "A". Actual: obj.prop ==='+obj.prop);
+	throw new Test262Error('#1: obj.prop === "A". Actual: obj.prop ==='+obj.prop);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -34,7 +34,7 @@ if (obj.prop !== "A") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__obj.prop !== "A") {
-	$ERROR('#2: __obj.prop === "A". Actual: __obj.prop ==='+obj.prop);
+	throw new Test262Error('#2: __obj.prop === "A". Actual: __obj.prop ==='+obj.prop);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -42,7 +42,7 @@ if (__obj.prop !== "A") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__obj.slot.prop !==1) {
-	$ERROR('#3: __obj.slot.prop ===1. Actual: __obj.slot.prop ==='+obj.slot.prop);
+	throw new Test262Error('#3: __obj.slot.prop ===1. Actual: __obj.slot.prop ==='+obj.slot.prop);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A16_T1.js b/test/language/statements/function/S13.2.2_A16_T1.js
index fa10c4eee8..1bb79a8a5f 100644
--- a/test/language/statements/function/S13.2.2_A16_T1.js
+++ b/test/language/statements/function/S13.2.2_A16_T1.js
@@ -12,7 +12,7 @@ description: >
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof __func !== "undefined") {
-	$ERROR('#1: typeof __func === "undefined". Actual: typeof __func ==='+typeof __func);
+	throw new Test262Error('#1: typeof __func === "undefined". Actual: typeof __func ==='+typeof __func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -22,7 +22,7 @@ var __obj = new function __func(){this.prop=1;};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__obj.prop !== 1) {
-	$ERROR('#2: __obj.prop === 1. Actual: __obj.prop ==='+__obj.prop);
+	throw new Test262Error('#2: __obj.prop === 1. Actual: __obj.prop ==='+__obj.prop);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -30,7 +30,7 @@ if (__obj.prop !== 1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#5
 if (typeof __func !== "undefined") {
-	$ERROR('#5: typeof __func === "undefined". Actual: typeof __func ==='+typeof __func);
+	throw new Test262Error('#5: typeof __func === "undefined". Actual: typeof __func ==='+typeof __func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A16_T2.js b/test/language/statements/function/S13.2.2_A16_T2.js
index e32aedf124..3755d14718 100644
--- a/test/language/statements/function/S13.2.2_A16_T2.js
+++ b/test/language/statements/function/S13.2.2_A16_T2.js
@@ -12,7 +12,7 @@ description: >
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof __func !== "undefined") {
-	$ERROR('#1: typeof __func === "undefined". Actual: typeof __func ==='+typeof __func);
+	throw new Test262Error('#1: typeof __func === "undefined". Actual: typeof __func ==='+typeof __func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -22,7 +22,7 @@ var __obj = new function __func(arg){this.prop=arg;}(5);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__obj.prop !== 5) {
-	$ERROR('#2: __obj.prop === 5. Actual: __obj.prop ==='+__obj.prop);
+	throw new Test262Error('#2: __obj.prop === 5. Actual: __obj.prop ==='+__obj.prop);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -30,7 +30,7 @@ if (__obj.prop !== 5) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (typeof __func !== "undefined") {
-	$ERROR('#3: typeof __func === "undefined". Actual: typeof __func ==='+typeof __func);
+	throw new Test262Error('#3: typeof __func === "undefined". Actual: typeof __func ==='+typeof __func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A16_T3.js b/test/language/statements/function/S13.2.2_A16_T3.js
index 7ea7e2b349..b7fd69da7a 100644
--- a/test/language/statements/function/S13.2.2_A16_T3.js
+++ b/test/language/statements/function/S13.2.2_A16_T3.js
@@ -12,7 +12,7 @@ description: >
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof __func !== "undefined") {
-	$ERROR('#1: typeof __func === "undefined"');
+	throw new Test262Error('#1: typeof __func === "undefined"');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -22,7 +22,7 @@ var __obj = new function __func(arg){this.prop=arg; return {feat: ++arg}}(5);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__obj.prop !== undefined) {
-	$ERROR('#2: __obj.prop === undefined. Actual: __obj.prop ==='+__obj.prop);
+	throw new Test262Error('#2: __obj.prop === undefined. Actual: __obj.prop ==='+__obj.prop);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -30,7 +30,7 @@ if (__obj.prop !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__obj.feat !== 6) {
-	$ERROR('#3: __obj.feat === 6. Actual: __obj.feat ==='+__obj.feat);
+	throw new Test262Error('#3: __obj.feat === 6. Actual: __obj.feat ==='+__obj.feat);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -38,7 +38,7 @@ if (__obj.feat !== 6) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if (typeof __func !== "undefined") {
-	$ERROR('#4: typeof __func === "undefined". Actual: typeof __func ==='+typeof __func);
+	throw new Test262Error('#4: typeof __func === "undefined". Actual: typeof __func ==='+typeof __func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A17_T2.js b/test/language/statements/function/S13.2.2_A17_T2.js
index 403014d044..f8f89cf291 100644
--- a/test/language/statements/function/S13.2.2_A17_T2.js
+++ b/test/language/statements/function/S13.2.2_A17_T2.js
@@ -30,7 +30,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (p1!=="alert") {
-	$ERROR('#1: p1 === "alert". Actual: p1==='+p1);
+	throw new Test262Error('#1: p1 === "alert". Actual: p1==='+p1);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -38,7 +38,7 @@ if (p1!=="alert") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (getRight()!=="napravo") {
-	$ERROR('#2: getRight() === "napravo". Actual: getRight() === '+getRight());
+	throw new Test262Error('#2: getRight() === "napravo". Actual: getRight() === '+getRight());
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -46,7 +46,7 @@ if (getRight()!=="napravo") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__obj.p1!=="w1") {
-	$ERROR('#3: __obj.p1 === "w1". Actual: __obj.p1 ==='+__obj.p1);
+	throw new Test262Error('#3: __obj.p1 === "w1". Actual: __obj.p1 ==='+__obj.p1);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -54,7 +54,7 @@ if (__obj.p1!=="w1") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if (__obj.getRight()!==false) {
-	$ERROR('#4: __obj.getRight() === false. Actual: __obj.getRight() === '+__obj.getRight());
+	throw new Test262Error('#4: __obj.getRight() === false. Actual: __obj.getRight() === '+__obj.getRight());
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -62,7 +62,7 @@ if (__obj.getRight()!==false) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#5
 if (resukt !== "alert") {
-	$ERROR('#5: resukt === "alert". Actual: resukt ==='+resukt);
+	throw new Test262Error('#5: resukt === "alert". Actual: resukt ==='+resukt);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A17_T3.js b/test/language/statements/function/S13.2.2_A17_T3.js
index a1d5c333c8..7dc289b8a9 100644
--- a/test/language/statements/function/S13.2.2_A17_T3.js
+++ b/test/language/statements/function/S13.2.2_A17_T3.js
@@ -29,7 +29,7 @@ resukt=(function(){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (p1!=="alert") {
-	$ERROR('#1: p1 === "alert". Actual: p1==='+p1);
+	throw new Test262Error('#1: p1 === "alert". Actual: p1==='+p1);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -37,7 +37,7 @@ if (p1!=="alert") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (getRight()!=="napravo") {
-	$ERROR('#2: getRight() === "napravo". Actual: getRight()==='+getRight());
+	throw new Test262Error('#2: getRight() === "napravo". Actual: getRight()==='+getRight());
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -45,7 +45,7 @@ if (getRight()!=="napravo") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__obj.p1!=="w1") {
-	$ERROR('#3: __obj.p1 === "w1". Actual: __obj.p1 ==='+__obj.p1);
+	throw new Test262Error('#3: __obj.p1 === "w1". Actual: __obj.p1 ==='+__obj.p1);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -53,7 +53,7 @@ if (__obj.p1!=="w1") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if (__obj.getRight()!==false) {
-	$ERROR('#4: __obj.getRight() === false. Actual: __obj.getRight()==='+__obj.getRight());
+	throw new Test262Error('#4: __obj.getRight() === false. Actual: __obj.getRight()==='+__obj.getRight());
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -61,7 +61,7 @@ if (__obj.getRight()!==false) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#5
 if (resukt !== "w1") {
-	$ERROR('#5: resukt === "w1". Actual: resukt ==='+resukt);
+	throw new Test262Error('#5: resukt === "w1". Actual: resukt ==='+resukt);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A18_T1.js b/test/language/statements/function/S13.2.2_A18_T1.js
index 89bf0ace6e..0bc2f0c4ef 100644
--- a/test/language/statements/function/S13.2.2_A18_T1.js
+++ b/test/language/statements/function/S13.2.2_A18_T1.js
@@ -25,7 +25,7 @@ result=(function(){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (callee !== 0) {
-	$ERROR('#1: callee === 0. Actual: callee ==='+callee);
+	throw new Test262Error('#1: callee === 0. Actual: callee ==='+callee);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -33,7 +33,7 @@ if (callee !== 0) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__obj.callee !== "a") {
-	$ERROR('#2: __obj.callee === "a". Actual: __obj.callee==='+__obj.callee);
+	throw new Test262Error('#2: __obj.callee === "a". Actual: __obj.callee==='+__obj.callee);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -41,7 +41,7 @@ if (__obj.callee !== "a") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (result.callee !== 1) {
-	$ERROR('#3: result.callee === 1. Actual: result.callee ==='+result.callee);
+	throw new Test262Error('#3: result.callee === 1. Actual: result.callee ==='+result.callee);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -49,7 +49,7 @@ if (result.callee !== 1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if (!(this.b)) {
-	$ERROR('#4: this.b === true. Actual: this.b ==='+this.b);
+	throw new Test262Error('#4: this.b === true. Actual: this.b ==='+this.b);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A18_T2.js b/test/language/statements/function/S13.2.2_A18_T2.js
index a1aaf73409..376ac54fc8 100644
--- a/test/language/statements/function/S13.2.2_A18_T2.js
+++ b/test/language/statements/function/S13.2.2_A18_T2.js
@@ -28,7 +28,7 @@ result=f(__obj);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (callee !== 0) {
-	$ERROR('#1: callee === 0. Actual: callee ==='+callee);
+	throw new Test262Error('#1: callee === 0. Actual: callee ==='+callee);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -36,7 +36,7 @@ if (callee !== 0) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__obj.callee !== "a") {
-	$ERROR('#2: __obj.callee === "a". Actual: __obj.callee ==='+__obj.callee);
+	throw new Test262Error('#2: __obj.callee === "a". Actual: __obj.callee ==='+__obj.callee);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -44,7 +44,7 @@ if (__obj.callee !== "a") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (result.callee !== 1) {
-	$ERROR('#3: result.callee === 1. Actual: result.callee ==='+result.callee);
+	throw new Test262Error('#3: result.callee === 1. Actual: result.callee ==='+result.callee);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -52,7 +52,7 @@ if (result.callee !== 1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if (!(this.b)) {
-	$ERROR('#4: this.b === true. Actual: this.b ==='+this.b);
+	throw new Test262Error('#4: this.b === true. Actual: this.b ==='+this.b);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A19_T1.js b/test/language/statements/function/S13.2.2_A19_T1.js
index 4a7e06babc..97e30ce3f7 100644
--- a/test/language/statements/function/S13.2.2_A19_T1.js
+++ b/test/language/statements/function/S13.2.2_A19_T1.js
@@ -22,7 +22,7 @@ with (__obj)
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (result !== 1) {
-	$ERROR('#1: result === 1. Actual: result ==='+result);
+	throw new Test262Error('#1: result === 1. Actual: result ==='+result);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A19_T2.js b/test/language/statements/function/S13.2.2_A19_T2.js
index f5ae024751..e679dafc95 100644
--- a/test/language/statements/function/S13.2.2_A19_T2.js
+++ b/test/language/statements/function/S13.2.2_A19_T2.js
@@ -20,7 +20,7 @@ with (__obj)
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (result !== 2) {
-	$ERROR('#1: result === 2. Actual: result ==='+result);
+	throw new Test262Error('#1: result === 2. Actual: result ==='+result);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A19_T3.js b/test/language/statements/function/S13.2.2_A19_T3.js
index baf7e4f311..efeac37ba8 100644
--- a/test/language/statements/function/S13.2.2_A19_T3.js
+++ b/test/language/statements/function/S13.2.2_A19_T3.js
@@ -29,7 +29,7 @@ result = __func();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (result !== 2) {
-	$ERROR('#1: result === 2. Actual: result ==='+result);
+	throw new Test262Error('#1: result === 2. Actual: result ==='+result);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A19_T4.js b/test/language/statements/function/S13.2.2_A19_T4.js
index edd4dfa34f..b612387aed 100644
--- a/test/language/statements/function/S13.2.2_A19_T4.js
+++ b/test/language/statements/function/S13.2.2_A19_T4.js
@@ -31,7 +31,7 @@ result = __func();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (result !== 3) {
-	$ERROR('#1: result === 3. Actual: result ==='+result);
+	throw new Test262Error('#1: result === 3. Actual: result ==='+result);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A19_T5.js b/test/language/statements/function/S13.2.2_A19_T5.js
index 52b88a1fa6..84879ece85 100644
--- a/test/language/statements/function/S13.2.2_A19_T5.js
+++ b/test/language/statements/function/S13.2.2_A19_T5.js
@@ -35,7 +35,7 @@ result = __func();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (result !== 2) {
-	$ERROR('#1: result === 2. Actual: result ==='+result);
+	throw new Test262Error('#1: result === 2. Actual: result ==='+result);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A19_T6.js b/test/language/statements/function/S13.2.2_A19_T6.js
index 90c2f36de8..bf2d3430aa 100644
--- a/test/language/statements/function/S13.2.2_A19_T6.js
+++ b/test/language/statements/function/S13.2.2_A19_T6.js
@@ -36,7 +36,7 @@ with (__obj)
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (result !== 2) {
-	$ERROR('#1: result === 2. Actual: result ==='+result);
+	throw new Test262Error('#1: result === 2. Actual: result ==='+result);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A19_T7.js b/test/language/statements/function/S13.2.2_A19_T7.js
index f2b00a9cea..ead506f138 100644
--- a/test/language/statements/function/S13.2.2_A19_T7.js
+++ b/test/language/statements/function/S13.2.2_A19_T7.js
@@ -23,7 +23,7 @@ with (__obj)
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__obj.hasOwnProperty('__func')) {
-	$ERROR('#1: __obj.hasOwnProperty(\'__func\') === false');
+	throw new Test262Error('#1: __obj.hasOwnProperty(\'__func\') === false');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -31,7 +31,7 @@ if (__obj.hasOwnProperty('__func')) {
 ///////////////////////////////////// /////////////////////////////////////////
 //CHECK#2
 if (!(this.hasOwnProperty('__func'))) {
-	$ERROR('#2: this.hasOwnProperty(\'__func\') === true');
+	throw new Test262Error('#2: this.hasOwnProperty(\'__func\') === true');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -39,7 +39,7 @@ if (!(this.hasOwnProperty('__func'))) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__func in __obj) {
-	$ERROR('#3: (__func in __obj) === false');
+	throw new Test262Error('#3: (__func in __obj) === false');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -47,7 +47,7 @@ if (__func in __obj) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if (this.__func === undefined) {
-	$ERROR('#4: this.__func !== undefined');
+	throw new Test262Error('#4: this.__func !== undefined');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A19_T8.js b/test/language/statements/function/S13.2.2_A19_T8.js
index feeee3f0f5..bde555019d 100644
--- a/test/language/statements/function/S13.2.2_A19_T8.js
+++ b/test/language/statements/function/S13.2.2_A19_T8.js
@@ -11,7 +11,7 @@ flags: [noStrict]
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#0
 if (typeof __func !== "undefined") {
-	$ERROR('#0: typeof __func === "undefined". Actual: typeof __func ==='+typeof __func);
+	throw new Test262Error('#0: typeof __func === "undefined". Actual: typeof __func ==='+typeof __func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -36,7 +36,7 @@ delete __obj;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func() !== 2) {
-	$ERROR('#1: __func() === 2. Actual: __func() ==='+__func());
+	throw new Test262Error('#1: __func() === 2. Actual: __func() ==='+__func());
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -56,7 +56,7 @@ delete __obj;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__func()!=="b") {
-	$ERROR('#2: __func()==="b". Actual: __func()==='+__func());
+	throw new Test262Error('#2: __func()==="b". Actual: __func()==='+__func());
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -66,7 +66,7 @@ with ({a:99,b:"c"})
     //////////////////////////////////////////////////////////////////////////////
     //CHECK#3
     if (__func() !== "b") {
-    	$ERROR('#3: __func()==="b". Actual: __func()==='+__func());
+    	throw new Test262Error('#3: __func()==="b". Actual: __func()==='+__func());
     }
     //
     //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A1_T1.js b/test/language/statements/function/S13.2.2_A1_T1.js
index 146585a642..0a037fb8ab 100644
--- a/test/language/statements/function/S13.2.2_A1_T1.js
+++ b/test/language/statements/function/S13.2.2_A1_T1.js
@@ -18,7 +18,7 @@ try{
     __PROTO.type=__MONSTER;
 }
 catch(e){
-    $ERROR('#0: __PROTO.type=__MONSTER does not lead to throwing exception')
+    throw new Test262Error('#0: __PROTO.type=__MONSTER does not lead to throwing exception')
 }
 
 function __FACTORY(){};
@@ -30,7 +30,7 @@ var __monster = new __FACTORY();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (!(__PROTO.isPrototypeOf(__monster))) {
-	$ERROR('#1: __PROTO.isPrototypeOf(__monster) must be true');
+	throw new Test262Error('#1: __PROTO.isPrototypeOf(__monster) must be true');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -38,7 +38,7 @@ if (!(__PROTO.isPrototypeOf(__monster))) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__monster.type !==__MONSTER) {
-	$ERROR('#2: __monster.type ===__MONSTER. Actual: __monster.type ==='+__monster.type);
+	throw new Test262Error('#2: __monster.type ===__MONSTER. Actual: __monster.type ==='+__monster.type);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A1_T2.js b/test/language/statements/function/S13.2.2_A1_T2.js
index 9e5e965511..956af90a4c 100644
--- a/test/language/statements/function/S13.2.2_A1_T2.js
+++ b/test/language/statements/function/S13.2.2_A1_T2.js
@@ -18,7 +18,7 @@ try{
     __PROTO.type=__MONSTER;
 }
 catch(e){
-    $ERROR('#0: __PROTO.type=__MONSTER does not lead to throwing exception')
+    throw new Test262Error('#0: __PROTO.type=__MONSTER does not lead to throwing exception')
 }
 
 var __FACTORY = function(){};
@@ -30,7 +30,7 @@ var __monster = new __FACTORY();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (!(__PROTO.isPrototypeOf(__monster))) {
-	$ERROR('#1: __PROTO.isPrototypeOf(__monster) must be true');
+	throw new Test262Error('#1: __PROTO.isPrototypeOf(__monster) must be true');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -38,7 +38,7 @@ if (!(__PROTO.isPrototypeOf(__monster))) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__monster.type !==__MONSTER) {
-	$ERROR('#2: __monster.type ===__MONSTER. Actual: __monster.type ==='+__monster.type);
+	throw new Test262Error('#2: __monster.type ===__MONSTER. Actual: __monster.type ==='+__monster.type);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A2.js b/test/language/statements/function/S13.2.2_A2.js
index 1c1c13e939..839b2ae4bb 100644
--- a/test/language/statements/function/S13.2.2_A2.js
+++ b/test/language/statements/function/S13.2.2_A2.js
@@ -18,7 +18,7 @@ try{
     __PROTO.type=__PLANT;
 }
 catch(e){
-    $ERROR('#0: __PROTO.type=__PLANT does not lead to throwing exception')
+    throw new Test262Error('#0: __PROTO.type=__PLANT does not lead to throwing exception')
 }
 
 function __FACTORY(){};
@@ -31,10 +31,10 @@ var __rose = new __FACTORY();
 //CHECK#1
 try{
     __rose();
-    $ERROR('#1: __rose() lead to throwing exception');
+    throw new Test262Error('#1: __rose() lead to throwing exception');
 } catch(e){
     if (!(e instanceof TypeError)) {
-    	$ERROR('#2: Exception Type is TypeError. Actual: exception ==='+e);
+    	throw new Test262Error('#2: Exception Type is TypeError. Actual: exception ==='+e);
     }
 }
 //
diff --git a/test/language/statements/function/S13.2.2_A3_T1.js b/test/language/statements/function/S13.2.2_A3_T1.js
index 03f9c251b0..200da5113a 100644
--- a/test/language/statements/function/S13.2.2_A3_T1.js
+++ b/test/language/statements/function/S13.2.2_A3_T1.js
@@ -18,7 +18,7 @@ __FACTORY.prototype=1;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof __FACTORY.prototype !== 'number') {
-	$ERROR('#1: typeof __FACTORY.prototype === \'number\'. Actual: typeof __FACTORY.prototype ==='+(typeof __FACTORY.prototype));
+	throw new Test262Error('#1: typeof __FACTORY.prototype === \'number\'. Actual: typeof __FACTORY.prototype ==='+(typeof __FACTORY.prototype));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -28,7 +28,7 @@ var __device = new __FACTORY();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (!(Object.prototype.isPrototypeOf(__device))) {
-	$ERROR('#2: Object.prototype.isPrototypeOf(__device) === true');
+	throw new Test262Error('#2: Object.prototype.isPrototypeOf(__device) === true');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A3_T2.js b/test/language/statements/function/S13.2.2_A3_T2.js
index 164f31f7b4..7257af8304 100644
--- a/test/language/statements/function/S13.2.2_A3_T2.js
+++ b/test/language/statements/function/S13.2.2_A3_T2.js
@@ -18,7 +18,7 @@ __FACTORY.prototype=1;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof __FACTORY.prototype !== 'number') {
-	$ERROR('#1: typeof __FACTORY.prototype === \'number\'. Actual: typeof __FACTORY.prototype ==='+(typeof __FACTORY.prototype));
+	throw new Test262Error('#1: typeof __FACTORY.prototype === \'number\'. Actual: typeof __FACTORY.prototype ==='+(typeof __FACTORY.prototype));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -28,7 +28,7 @@ var __device = new __FACTORY();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (!(Object.prototype.isPrototypeOf(__device))) {
-	$ERROR('#2: Object.prototype.isPrototypeOf(__device) === true');
+	throw new Test262Error('#2: Object.prototype.isPrototypeOf(__device) === true');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A4_T1.js b/test/language/statements/function/S13.2.2_A4_T1.js
index 4ceb1d0667..b203a705bd 100644
--- a/test/language/statements/function/S13.2.2_A4_T1.js
+++ b/test/language/statements/function/S13.2.2_A4_T1.js
@@ -23,7 +23,7 @@ var __device = new __FACTORY();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__device.printShape === undefined) {
-	$ERROR('#1: __device.printShape !== undefined. Actual: __device.printShape ==='+__device.printShape);
+	throw new Test262Error('#1: __device.printShape !== undefined. Actual: __device.printShape ==='+__device.printShape);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -31,7 +31,7 @@ if (__device.printShape === undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__device.printShape() !== __CUBE) {
-	$ERROR('#2: __device.printShape() === __CUBE. Actual: __device.printShape() ==='+__device.printShape());
+	throw new Test262Error('#2: __device.printShape() === __CUBE. Actual: __device.printShape() ==='+__device.printShape());
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A4_T2.js b/test/language/statements/function/S13.2.2_A4_T2.js
index dc6cfc3e52..120e51679b 100644
--- a/test/language/statements/function/S13.2.2_A4_T2.js
+++ b/test/language/statements/function/S13.2.2_A4_T2.js
@@ -25,7 +25,7 @@ __device = new __FACTORY();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__device.printShape === undefined) {
-	$ERROR('#1: __device.printShape !== undefined. Actual: __device.printShape ==='+__device.printShape);
+	throw new Test262Error('#1: __device.printShape !== undefined. Actual: __device.printShape ==='+__device.printShape);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -33,7 +33,7 @@ if (__device.printShape === undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__device.printShape() !== __CUBE) {
-	$ERROR('#2: __device.printShape() === __CUBE. Actual: __device.printShape() ==='+__device.printShape());
+	throw new Test262Error('#2: __device.printShape() === __CUBE. Actual: __device.printShape() ==='+__device.printShape());
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A5_T1.js b/test/language/statements/function/S13.2.2_A5_T1.js
index 08621d8ee6..4648aa78c7 100644
--- a/test/language/statements/function/S13.2.2_A5_T1.js
+++ b/test/language/statements/function/S13.2.2_A5_T1.js
@@ -35,7 +35,7 @@ __device = new __FACTORY(__ID, __BOTTOM, __TOP, __LEFT);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__device.color !== undefined) {
-	$ERROR('#1: __device.color === undefined. Actual: __device.color ==='+__device.color);
+	throw new Test262Error('#1: __device.color === undefined. Actual: __device.color ==='+__device.color);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -43,7 +43,7 @@ if (__device.color !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__device.volume !== __VOLUME) {
-	$ERROR('#2: __device.volume === __VOLUME. Actual: __device.volume ==='+__device.volume);
+	throw new Test262Error('#2: __device.volume === __VOLUME. Actual: __device.volume ==='+__device.volume);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -51,7 +51,7 @@ if (__device.volume !== __VOLUME) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__device.bottom !== undefined) {
-	$ERROR('#3: __device.bottom === undefined. Actual: __device.bottom ==='+__device.bottom);
+	throw new Test262Error('#3: __device.bottom === undefined. Actual: __device.bottom ==='+__device.bottom);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -59,7 +59,7 @@ if (__device.bottom !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if (__device.id !== __ID) {
-	$ERROR('#4: __device.id === __ID. Actual: __device.id ==='+__device.id);
+	throw new Test262Error('#4: __device.id === __ID. Actual: __device.id ==='+__device.id);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -67,7 +67,7 @@ if (__device.id !== __ID) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#5
 if (__device.left !== undefined) {
-	$ERROR('#5: __device.left === undefined. Actual: __device.left ==='+__device.left);
+	throw new Test262Error('#5: __device.left === undefined. Actual: __device.left ==='+__device.left);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -75,7 +75,7 @@ if (__device.left !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#6
 if (__device.top !== __TOP) {
-	$ERROR('#6: __device.top === __TOP. Actual: __device.top ==='+__device.top);
+	throw new Test262Error('#6: __device.top === __TOP. Actual: __device.top ==='+__device.top);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A5_T2.js b/test/language/statements/function/S13.2.2_A5_T2.js
index 1b7b0f2655..40b5c1e683 100644
--- a/test/language/statements/function/S13.2.2_A5_T2.js
+++ b/test/language/statements/function/S13.2.2_A5_T2.js
@@ -35,7 +35,7 @@ __device = new __FACTORY(__ID, __BOTTOM, __TOP, __LEFT);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__device.color !== undefined) {
-	$ERROR('#1: __device.color === undefined. Actual: __device.color ==='+__device.color);
+	throw new Test262Error('#1: __device.color === undefined. Actual: __device.color ==='+__device.color);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -43,7 +43,7 @@ if (__device.color !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__device.volume !== __VOLUME) {
-	$ERROR('#2: __device.volume === __VOLUME. Actual: __device.volume ==='+__device.volume);
+	throw new Test262Error('#2: __device.volume === __VOLUME. Actual: __device.volume ==='+__device.volume);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -51,7 +51,7 @@ if (__device.volume !== __VOLUME) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__device.bottom !== undefined) {
-	$ERROR('#3: __device.bottom === undefined. Actual: __device.bottom ==='+__device.bottom);
+	throw new Test262Error('#3: __device.bottom === undefined. Actual: __device.bottom ==='+__device.bottom);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -59,7 +59,7 @@ if (__device.bottom !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if (__device.id !== __ID) {
-	$ERROR('#4: __device.id === __ID. Actual: __device.id ==='+__device.id);
+	throw new Test262Error('#4: __device.id === __ID. Actual: __device.id ==='+__device.id);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -67,7 +67,7 @@ if (__device.id !== __ID) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#5
 if (__device.left !== undefined) {
-	$ERROR('#5: __device.left === undefined. Actual: __device.left ==='+__device.left);
+	throw new Test262Error('#5: __device.left === undefined. Actual: __device.left ==='+__device.left);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -75,7 +75,7 @@ if (__device.left !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#6
 if (__device.top !== __TOP) {
-	$ERROR('#6: __device.top === __TOP. Actual: __device.top ==='+__device.top);
+	throw new Test262Error('#6: __device.top === __TOP. Actual: __device.top ==='+__device.top);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A6_T1.js b/test/language/statements/function/S13.2.2_A6_T1.js
index 679e56d876..838c19f191 100644
--- a/test/language/statements/function/S13.2.2_A6_T1.js
+++ b/test/language/statements/function/S13.2.2_A6_T1.js
@@ -28,7 +28,7 @@ __obj = new __func(__FOO, __BAR);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__obj.foo!==__FOO) {
-	$ERROR('#1: __obj.foo === __FOO. Actual: __obj.foo==='+__obj.foo);
+	throw new Test262Error('#1: __obj.foo === __FOO. Actual: __obj.foo==='+__obj.foo);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -36,7 +36,7 @@ if (__obj.foo!==__FOO) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__obj.bar!==undefined) {
-	$ERROR('#2: __obj.bar === undefined. Actual: __obj.bar==='+__obj.bar);
+	throw new Test262Error('#2: __obj.bar === undefined. Actual: __obj.bar==='+__obj.bar);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A6_T2.js b/test/language/statements/function/S13.2.2_A6_T2.js
index a2b02de8c4..94350ce615 100644
--- a/test/language/statements/function/S13.2.2_A6_T2.js
+++ b/test/language/statements/function/S13.2.2_A6_T2.js
@@ -26,7 +26,7 @@ var __obj = new __func(__FOO, __BAR);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__obj.foo!==__FOO) {
-	$ERROR('#1: __obj.foo === __FOO. Actual: __obj.foo==='+__obj.foo);
+	throw new Test262Error('#1: __obj.foo === __FOO. Actual: __obj.foo==='+__obj.foo);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -34,7 +34,7 @@ if (__obj.foo!==__FOO) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__obj.bar!==undefined) {
-	$ERROR('#2: __obj.bar === undefined. Actual: __obj.bar==='+__obj.bar);
+	throw new Test262Error('#2: __obj.bar === undefined. Actual: __obj.bar==='+__obj.bar);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A7_T1.js b/test/language/statements/function/S13.2.2_A7_T1.js
index a1fe46ddd0..b79025e210 100644
--- a/test/language/statements/function/S13.2.2_A7_T1.js
+++ b/test/language/statements/function/S13.2.2_A7_T1.js
@@ -27,7 +27,7 @@ var __obj__ = new __func(__FRST, __SCND);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__obj__.first !== undefined) {
-	$ERROR('#1: __obj__.first === undefined. Actual: __obj__.first==='+__obj__.first);
+	throw new Test262Error('#1: __obj__.first === undefined. Actual: __obj__.first==='+__obj__.first);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -35,7 +35,7 @@ if (__obj__.first !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__obj__.second !== __SCND) {
-	$ERROR('#2: __obj__.second === __SCND. Actual: __obj__.second ==='+__obj__.second);
+	throw new Test262Error('#2: __obj__.second === __SCND. Actual: __obj__.second ==='+__obj__.second);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A7_T2.js b/test/language/statements/function/S13.2.2_A7_T2.js
index 025ae4c1b1..277037ca9f 100644
--- a/test/language/statements/function/S13.2.2_A7_T2.js
+++ b/test/language/statements/function/S13.2.2_A7_T2.js
@@ -29,7 +29,7 @@ __obj__ = new __func(__FRST, __SCND);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__obj__.first !== undefined) {
-	$ERROR('#1: __obj__.first === undefined. Actual: __obj__.first==='+__obj__.first);
+	throw new Test262Error('#1: __obj__.first === undefined. Actual: __obj__.first==='+__obj__.first);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -37,7 +37,7 @@ if (__obj__.first !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__obj__.second !== __SCND) {
-	$ERROR('#2: __obj__.second === __SCND. Actual: __obj__.second ==='+__obj__.second);
+	throw new Test262Error('#2: __obj__.second === __SCND. Actual: __obj__.second ==='+__obj__.second);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A8_T1.js b/test/language/statements/function/S13.2.2_A8_T1.js
index 6724247c44..2c92698e1b 100644
--- a/test/language/statements/function/S13.2.2_A8_T1.js
+++ b/test/language/statements/function/S13.2.2_A8_T1.js
@@ -32,7 +32,7 @@ var __instance = new __func(__FRST, __SCND);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__instance.first !== undefined) {
-	$ERROR('#1: __instance.first === undefined. Actual: __instance.first ==='+__instance.first);
+	throw new Test262Error('#1: __instance.first === undefined. Actual: __instance.first ==='+__instance.first);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -40,7 +40,7 @@ if (__instance.first !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__instance.prop!==__SCND) {
-	$ERROR('#2: __instance.prop === __SCND. Actual: __instance.prop ==='+__instance.prop);
+	throw new Test262Error('#2: __instance.prop === __SCND. Actual: __instance.prop ==='+__instance.prop);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -48,7 +48,7 @@ if (__instance.prop!==__SCND) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__instance(1)!== 2) {
-	$ERROR('#2: __instance(1)=== 2. Actual: __instance(1) ==='+__instance(1));
+	throw new Test262Error('#2: __instance(1)=== 2. Actual: __instance(1) ==='+__instance(1));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A8_T2.js b/test/language/statements/function/S13.2.2_A8_T2.js
index 55571d2b64..2f05ec2193 100644
--- a/test/language/statements/function/S13.2.2_A8_T2.js
+++ b/test/language/statements/function/S13.2.2_A8_T2.js
@@ -30,7 +30,7 @@ var __instance = new __func(__FRST, __SCND);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__instance.first !== undefined) {
-	$ERROR('#1: __instance.first === undefined. Actual: __instance.first ==='+__instance.first);
+	throw new Test262Error('#1: __instance.first === undefined. Actual: __instance.first ==='+__instance.first);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -38,7 +38,7 @@ if (__instance.first !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__instance.prop!==__SCND) {
-	$ERROR('#2: __instance.prop === __SCND. Actual: __instance.prop ==='+__instance.prop);
+	throw new Test262Error('#2: __instance.prop === __SCND. Actual: __instance.prop ==='+__instance.prop);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -46,7 +46,7 @@ if (__instance.prop!==__SCND) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__instance("SAM")!== "SAMBA") {
-	$ERROR('#2: __instance("SAM") === "SAMBA". Actual: __instance("SAM") ==='+__instance("SAM"));
+	throw new Test262Error('#2: __instance("SAM") === "SAMBA". Actual: __instance("SAM") ==='+__instance("SAM"));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A8_T3.js b/test/language/statements/function/S13.2.2_A8_T3.js
index 816ad3db9d..9a72be3a13 100644
--- a/test/language/statements/function/S13.2.2_A8_T3.js
+++ b/test/language/statements/function/S13.2.2_A8_T3.js
@@ -30,7 +30,7 @@ var __instance = new __func(__FRST, __SCND);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__instance.first !== undefined) {
-	$ERROR('#1: __instance.first === undefined. Actual: __instance.first ==='+__instance.first);
+	throw new Test262Error('#1: __instance.first === undefined. Actual: __instance.first ==='+__instance.first);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -38,7 +38,7 @@ if (__instance.first !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__instance.prop!==__SCND) {
-	$ERROR('#2: __instance.prop === __SCND. Actual: __instance.prop ==='+__instance.prop);
+	throw new Test262Error('#2: __instance.prop === __SCND. Actual: __instance.prop ==='+__instance.prop);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -46,7 +46,7 @@ if (__instance.prop!==__SCND) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__instance(1)!== 2) {
-	$ERROR('#2: __instance(1)=== 2. Actual: __instance(1) ==='+__instance(1));
+	throw new Test262Error('#2: __instance(1)=== 2. Actual: __instance(1) ==='+__instance(1));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2.2_A9.js b/test/language/statements/function/S13.2.2_A9.js
index bbc021a991..8992d9a01e 100644
--- a/test/language/statements/function/S13.2.2_A9.js
+++ b/test/language/statements/function/S13.2.2_A9.js
@@ -23,7 +23,7 @@ function FACTORY(){
 //CHECK#1
 try {
 	var obj = new FACTORY();
-	$ERROR('#1: var obj = new FACTORY() lead to throwing exception');
+	throw new Test262Error('#1: var obj = new FACTORY() lead to throwing exception');
 } catch (e) {
     if (e instanceof Test262Error) throw e;
 }
diff --git a/test/language/statements/function/S13.2_A1_T1.js b/test/language/statements/function/S13.2_A1_T1.js
index f916ff1eaf..55ad4f2903 100644
--- a/test/language/statements/function/S13.2_A1_T1.js
+++ b/test/language/statements/function/S13.2_A1_T1.js
@@ -12,7 +12,7 @@ function __func(){};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func.prototype === undefined) {
-	$ERROR('#1: __func.prototype !== undefined');
+	throw new Test262Error('#1: __func.prototype !== undefined');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2_A1_T2.js b/test/language/statements/function/S13.2_A1_T2.js
index 9236dd6609..c07e31e934 100644
--- a/test/language/statements/function/S13.2_A1_T2.js
+++ b/test/language/statements/function/S13.2_A1_T2.js
@@ -12,7 +12,7 @@ var __func = function(){};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func.prototype === undefined) {
-	$ERROR('#1: __func.prototype !== undefined');
+	throw new Test262Error('#1: __func.prototype !== undefined');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2_A2_T1.js b/test/language/statements/function/S13.2_A2_T1.js
index 4f3f50e93e..90ab12bdbe 100644
--- a/test/language/statements/function/S13.2_A2_T1.js
+++ b/test/language/statements/function/S13.2_A2_T1.js
@@ -20,7 +20,7 @@ function __FUNC(){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__FUNC()(__JEDI) !== __JEDI) {
-	$ERROR('#1: __FUNC()(__JEDI) === __JEDI. Actual: __FUNC()(__JEDI) ==='+__FUNC()(__JEDI));
+	throw new Test262Error('#1: __FUNC()(__JEDI) === __JEDI. Actual: __FUNC()(__JEDI) ==='+__FUNC()(__JEDI));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2_A2_T2.js b/test/language/statements/function/S13.2_A2_T2.js
index ba3021419c..1f4f38bc99 100644
--- a/test/language/statements/function/S13.2_A2_T2.js
+++ b/test/language/statements/function/S13.2_A2_T2.js
@@ -22,7 +22,7 @@ function __FUNC(){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__FUNC()()(__ROBOT) !== __ROBOT) {
-	$ERROR('#1: __FUNC()()(__ROBOT) === __ROBOT. Actual: __FUNC()()(__ROBOT) ==='+__FUNC()()(__ROBOT));
+	throw new Test262Error('#1: __FUNC()()(__ROBOT) === __ROBOT. Actual: __FUNC()()(__ROBOT) ==='+__FUNC()()(__ROBOT));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2_A3.js b/test/language/statements/function/S13.2_A3.js
index dab24005e8..b28178ddca 100644
--- a/test/language/statements/function/S13.2_A3.js
+++ b/test/language/statements/function/S13.2_A3.js
@@ -16,7 +16,7 @@ function __func(){};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func.length !== 0) {
-	$ERROR('#1: __func.length === 0. Actual: __func.length ==='+__func.length);
+	throw new Test262Error('#1: __func.length === 0. Actual: __func.length ==='+__func.length);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -26,7 +26,7 @@ function __gunc(a,b,c){};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__gunc.length !== 3) {
-	$ERROR('#2: __gunc.length === 3. Actual: __gunc.length ==='+__gunc.length);
+	throw new Test262Error('#2: __gunc.length === 3. Actual: __gunc.length ==='+__gunc.length);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2_A4_T1.js b/test/language/statements/function/S13.2_A4_T1.js
index f76c5983b2..92fa77a9aa 100644
--- a/test/language/statements/function/S13.2_A4_T1.js
+++ b/test/language/statements/function/S13.2_A4_T1.js
@@ -19,7 +19,7 @@ function __func(){};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof __func.prototype !== 'object') {
-	$ERROR('#1: typeof __func.prototype === \'object\'. Actual: typeof __gunc.prototype ==='+typeof __gunc.prototype);
+	throw new Test262Error('#1: typeof __func.prototype === \'object\'. Actual: typeof __gunc.prototype ==='+typeof __gunc.prototype);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -27,7 +27,7 @@ if (typeof __func.prototype !== 'object') {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__func.prototype.constructor !== __func) {
-	$ERROR('#2: __func.prototype.constructor === __func. Actual: __gunc.prototype.constructor ==='+__gunc.prototype.constructor);
+	throw new Test262Error('#2: __func.prototype.constructor === __func. Actual: __gunc.prototype.constructor ==='+__gunc.prototype.constructor);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -42,7 +42,7 @@ for (__prop in __func.prototype){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__constructor_was__enumed) {
-	$ERROR('#3: __constructor_was__enumed === false. Actual: __constructor_was__enumed ==='+__constructor_was__enumed);
+	throw new Test262Error('#3: __constructor_was__enumed === false. Actual: __constructor_was__enumed ==='+__constructor_was__enumed);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2_A4_T2.js b/test/language/statements/function/S13.2_A4_T2.js
index 5b60382726..56cfb176b3 100644
--- a/test/language/statements/function/S13.2_A4_T2.js
+++ b/test/language/statements/function/S13.2_A4_T2.js
@@ -19,7 +19,7 @@ var __gunc = function(){};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof __gunc.prototype !== 'object') {
-	$ERROR('#1: typeof __gunc.prototype === \'object\'. Actual: typeof __gunc.prototype ==='+typeof __gunc.prototype);
+	throw new Test262Error('#1: typeof __gunc.prototype === \'object\'. Actual: typeof __gunc.prototype ==='+typeof __gunc.prototype);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -27,7 +27,7 @@ if (typeof __gunc.prototype !== 'object') {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__gunc.prototype.constructor !== __gunc) {
-	$ERROR('#2: __gunc.prototype.constructor === __gunc. Actual: __gunc.prototype.constructor ==='+__gunc.prototype.constructor);
+	throw new Test262Error('#2: __gunc.prototype.constructor === __gunc. Actual: __gunc.prototype.constructor ==='+__gunc.prototype.constructor);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -42,7 +42,7 @@ for (__prop in __gunc.prototype){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__constructor_was__enumed) {
-	$ERROR('#3: __constructor_was__enumed === false. Actual: __constructor_was__enumed ==='+__constructor_was__enumed);
+	throw new Test262Error('#3: __constructor_was__enumed === false. Actual: __constructor_was__enumed ==='+__constructor_was__enumed);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13.2_A5.js b/test/language/statements/function/S13.2_A5.js
index 5c8a118a18..bfb1d82047 100644
--- a/test/language/statements/function/S13.2_A5.js
+++ b/test/language/statements/function/S13.2_A5.js
@@ -14,7 +14,7 @@ function __func(){};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (!(Function.prototype.isPrototypeOf(__func))) {
-	$ERROR('#1: Function.prototype.isPrototypeOf(__func)');
+	throw new Test262Error('#1: Function.prototype.isPrototypeOf(__func)');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ var __gunc = function(){};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (!(Function.prototype.isPrototypeOf(__gunc))) {
-	$ERROR('#1: Function.prototype.isPrototypeOf(__gunc)');
+	throw new Test262Error('#1: Function.prototype.isPrototypeOf(__gunc)');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A1.js b/test/language/statements/function/S13_A1.js
index 10616c6649..2660ac2d86 100644
--- a/test/language/statements/function/S13_A1.js
+++ b/test/language/statements/function/S13_A1.js
@@ -15,7 +15,7 @@ var __func = function __exp__func(){return 0;};
 // //////////////////////////////
 //CHECK#1
 if (typeof __func !== "function") {
-	$ERROR('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func);
+	throw new Test262Error('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ if (typeof __func !== "function") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (typeof __exp__func !== "undefined"){
-    $ERROR('#2: typeof __exp__func === "undefined". Actual: typeof __exp__func ==='+typeof __exp__func);
+    throw new Test262Error('#2: typeof __exp__func === "undefined". Actual: typeof __exp__func ==='+typeof __exp__func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A10.js b/test/language/statements/function/S13_A10.js
index cfc8bf53b0..f886c2c6a5 100644
--- a/test/language/statements/function/S13_A10.js
+++ b/test/language/statements/function/S13_A10.js
@@ -16,7 +16,7 @@ __music_box.ziggy = __ziggy__func;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#
 if (typeof __music_box.ziggy !== "function") {
-	$ERROR('#1: typeof __music_box.ziggy === "function". Actual: typeof __music_box.ziggy ==='+typeof __music_box.ziggy);
+	throw new Test262Error('#1: typeof __music_box.ziggy === "function". Actual: typeof __music_box.ziggy ==='+typeof __music_box.ziggy);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -24,7 +24,7 @@ if (typeof __music_box.ziggy !== "function") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__music_box.ziggy() !== "ziggy stardust") {
-	$ERROR('#2: __music_box.ziggy() === "ziggy stardust". Actual: __music_box.ziggy() ==='+__music_box.ziggy());
+	throw new Test262Error('#2: __music_box.ziggy() === "ziggy stardust". Actual: __music_box.ziggy() ==='+__music_box.ziggy());
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A11_T1.js b/test/language/statements/function/S13_A11_T1.js
index 59062599bf..4effa2425a 100644
--- a/test/language/statements/function/S13_A11_T1.js
+++ b/test/language/statements/function/S13_A11_T1.js
@@ -15,7 +15,7 @@ function __func(){ return delete arguments;}
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func("A","B",1,2)) {
-	$ERROR('#1: arguments property has attribute { DontDelete }');
+	throw new Test262Error('#1: arguments property has attribute { DontDelete }');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A11_T2.js b/test/language/statements/function/S13_A11_T2.js
index f3106ce5a4..21331f5349 100644
--- a/test/language/statements/function/S13_A11_T2.js
+++ b/test/language/statements/function/S13_A11_T2.js
@@ -20,7 +20,7 @@ function __func(){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof __func("A","B",1,2) !== "object") {
-	$ERROR('#1: arguments property has attribute { DontDelete }');
+	throw new Test262Error('#1: arguments property has attribute { DontDelete }');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A11_T3.js b/test/language/statements/function/S13_A11_T3.js
index 50926309a4..34f021f037 100644
--- a/test/language/statements/function/S13_A11_T3.js
+++ b/test/language/statements/function/S13_A11_T3.js
@@ -19,7 +19,7 @@ function __func(){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (!__func("A","B",1,2)) {
-	$ERROR('#1: Since arguments property has attribute { DontDelete } elements of arguments can be deleted');
+	throw new Test262Error('#1: Since arguments property has attribute { DontDelete } elements of arguments can be deleted');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A11_T4.js b/test/language/statements/function/S13_A11_T4.js
index 8481af06e4..5e2a987d0e 100644
--- a/test/language/statements/function/S13_A11_T4.js
+++ b/test/language/statements/function/S13_A11_T4.js
@@ -22,7 +22,7 @@ function __func(){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (!__func("A","B",1,2)) {
-	$ERROR('#1: Since arguments property has attribute { DontDelete }, but elements of arguments can be deleted');
+	throw new Test262Error('#1: Since arguments property has attribute { DontDelete }, but elements of arguments can be deleted');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A12_T1.js b/test/language/statements/function/S13_A12_T1.js
index b665fe9df7..ef7cb90482 100644
--- a/test/language/statements/function/S13_A12_T1.js
+++ b/test/language/statements/function/S13_A12_T1.js
@@ -19,7 +19,7 @@ function __func(){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (delete __func) {
-	$ERROR('#1: delete __func returning false');
+	throw new Test262Error('#1: delete __func returning false');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -27,7 +27,7 @@ if (delete __func) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__func() !== ALIVE) {
-	$ERROR('#2: __func() === ALIVE. Actual: __func() ==='+__func());
+	throw new Test262Error('#2: __func() === ALIVE. Actual: __func() ==='+__func());
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A12_T2.js b/test/language/statements/function/S13_A12_T2.js
index 46f81baae1..cdfdc3720a 100644
--- a/test/language/statements/function/S13_A12_T2.js
+++ b/test/language/statements/function/S13_A12_T2.js
@@ -21,7 +21,7 @@ function __cont(){
     //////////////////////////////////////////////////////////////////////////////
     //CHECK#1
     if (delete __func) {
-    	$ERROR('#1: delete __func returning false');
+    	throw new Test262Error('#1: delete __func returning false');
     }
     //
     //////////////////////////////////////////////////////////////////////////////
@@ -29,7 +29,7 @@ function __cont(){
     //////////////////////////////////////////////////////////////////////////////
     //CHECK#2
     if (__func() !== ALIVE) {
-    	$ERROR('#2: __func() === ALIVE. Actual: __func() ==='+__func());
+    	throw new Test262Error('#2: __func() === ALIVE. Actual: __func() ==='+__func());
     }
     //
     //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A13_T1.js b/test/language/statements/function/S13_A13_T1.js
index 509e98ed1d..9df3708f89 100644
--- a/test/language/statements/function/S13_A13_T1.js
+++ b/test/language/statements/function/S13_A13_T1.js
@@ -10,7 +10,7 @@ description: Deleting arguments[i]
 function __func(__arg){
   delete arguments[0];
   if (arguments[0] !== undefined) {
-    $ERROR('#1.1: arguments[0] === undefined');
+    throw new Test262Error('#1.1: arguments[0] === undefined');
   }
   return __arg;
 }
@@ -18,7 +18,7 @@ function __func(__arg){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func(1) !== 1) {
-	$ERROR('#1.2: __func(1) === 1. Actual: __func(1) ==='+__func(1));
+	throw new Test262Error('#1.2: __func(1) === 1. Actual: __func(1) ==='+__func(1));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A13_T2.js b/test/language/statements/function/S13_A13_T2.js
index 2ca9ca3bbf..9639b4c80d 100644
--- a/test/language/statements/function/S13_A13_T2.js
+++ b/test/language/statements/function/S13_A13_T2.js
@@ -11,7 +11,7 @@ function __func(__arg){
   __arg = 2;
   delete arguments[0];
   if (arguments[0] !== undefined) {
-    $ERROR('#1.1: arguments[0] === undefined');
+    throw new Test262Error('#1.1: arguments[0] === undefined');
   }
   return __arg;
 }
@@ -19,7 +19,7 @@ function __func(__arg){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func(1) !== 2) {
-	$ERROR('#1.2: __func(1) === 2. Actual: __func(1) ==='+__func(1));
+	throw new Test262Error('#1.2: __func(1) === 2. Actual: __func(1) ==='+__func(1));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A13_T3.js b/test/language/statements/function/S13_A13_T3.js
index 73260e9390..b72edf7e44 100644
--- a/test/language/statements/function/S13_A13_T3.js
+++ b/test/language/statements/function/S13_A13_T3.js
@@ -13,11 +13,11 @@ function __func(__arg){
   __arg = 2;
   delete arguments[0];
   if (arguments[0] !== undefined) {
-    $ERROR('#1.1: arguments[0] === undefined');
+    throw new Test262Error('#1.1: arguments[0] === undefined');
   }
   arguments[0] = "A";
   if (arguments[0] !== "A") {
-    $ERROR('#1.2: arguments[0] === "A"');
+    throw new Test262Error('#1.2: arguments[0] === "A"');
   }
   return __arg;
 }
@@ -25,7 +25,7 @@ function __func(__arg){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func(1) !== 2) {
-	$ERROR('#1.3: __func(1) === 2. Actual: __func(1) ==='+__func(1));
+	throw new Test262Error('#1.3: __func(1) === 2. Actual: __func(1) ==='+__func(1));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A14_T1.js b/test/language/statements/function/S13_A14_T1.js
index 6051776242..a7339e74da 100644
--- a/test/language/statements/function/S13_A14_T1.js
+++ b/test/language/statements/function/S13_A14_T1.js
@@ -13,7 +13,7 @@ eval("function __func\u0041(__arg){return __arg;};");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof __funcA !== "function") {
-	$ERROR('#1: unicode symbols in function name are allowed');
+	throw new Test262Error('#1: unicode symbols in function name are allowed');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A15_T1.js b/test/language/statements/function/S13_A15_T1.js
index 8a4286423e..e94c37c2ae 100644
--- a/test/language/statements/function/S13_A15_T1.js
+++ b/test/language/statements/function/S13_A15_T1.js
@@ -15,7 +15,7 @@ function __func(arguments){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func(42) !== 42) {
-	$ERROR('#1: "arguments" variable overrides ActivationObject.arguments');
+	throw new Test262Error('#1: "arguments" variable overrides ActivationObject.arguments');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A15_T2.js b/test/language/statements/function/S13_A15_T2.js
index 241ee049c6..8803f181b7 100644
--- a/test/language/statements/function/S13_A15_T2.js
+++ b/test/language/statements/function/S13_A15_T2.js
@@ -18,7 +18,7 @@ function __func(){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func(42,42,42) !== THE_ANSWER) {
-	$ERROR('#1:  "arguments" variable overrides ActivationObject.arguments');
+	throw new Test262Error('#1:  "arguments" variable overrides ActivationObject.arguments');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A15_T3.js b/test/language/statements/function/S13_A15_T3.js
index f4f741928a..de736accc1 100644
--- a/test/language/statements/function/S13_A15_T3.js
+++ b/test/language/statements/function/S13_A15_T3.js
@@ -20,7 +20,7 @@ function __func(arguments){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof __func() !== "undefined") {
-	$ERROR('#1: typeof __func() === "undefined". Actual: typeof __func() ==='+typeof __func());
+	throw new Test262Error('#1: typeof __func() === "undefined". Actual: typeof __func() ==='+typeof __func());
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -28,7 +28,7 @@ if (typeof __func() !== "undefined") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__func("The Ultimate Question") !== "The Ultimate Question") {
-	$ERROR('#2: __func("The Ultimate Question") === "The Ultimate Question". Actual: __func("The Ultimate Question")==='+__func("The Ultimate Question"));
+	throw new Test262Error('#2: __func("The Ultimate Question") === "The Ultimate Question". Actual: __func("The Ultimate Question")==='+__func("The Ultimate Question"));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A15_T4.js b/test/language/statements/function/S13_A15_T4.js
index 9f8524db53..b6f6563714 100644
--- a/test/language/statements/function/S13_A15_T4.js
+++ b/test/language/statements/function/S13_A15_T4.js
@@ -20,7 +20,7 @@ function __func(){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func(42,42,42) !== "object") {
-	$ERROR('#1: __func(42,42,42) === "object". Actual: __func(42,42,42)==='+__func(42,42,42));
+	throw new Test262Error('#1: __func(42,42,42) === "object". Actual: __func(42,42,42)==='+__func(42,42,42));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A15_T5.js b/test/language/statements/function/S13_A15_T5.js
index 9563b78390..07a0168d4f 100644
--- a/test/language/statements/function/S13_A15_T5.js
+++ b/test/language/statements/function/S13_A15_T5.js
@@ -19,7 +19,7 @@ function __func(){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if ( __func() === THE_ANSWER) {
-	$ERROR('#1: __func() !== THE_ANSWER');
+	throw new Test262Error('#1: __func() !== THE_ANSWER');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -27,7 +27,7 @@ if ( __func() === THE_ANSWER) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__func("The Ultimate Question") === "The Ultimate Question") {
-	$ERROR('#2: __func("The Ultimate Question") !== "The Ultimate Question"');
+	throw new Test262Error('#2: __func("The Ultimate Question") !== "The Ultimate Question"');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A17_T1.js b/test/language/statements/function/S13_A17_T1.js
index 44adcb3cb8..8e3298a051 100644
--- a/test/language/statements/function/S13_A17_T1.js
+++ b/test/language/statements/function/S13_A17_T1.js
@@ -13,10 +13,10 @@ description: Trying to call a function before the FunctionExpression appears
 //CHECK#1
 try{
     var __result = __func();
-	$ERROR("#1.1: var __result = __func() lead to throwing exception");
+	throw new Test262Error("#1.1: var __result = __func() lead to throwing exception");
 } catch(e) {
   if ((e instanceof TypeError) !== true) {
-    $ERROR('#1.2: func should throw a TypeError  Actual: ' + (e));  
+    throw new Test262Error('#1.2: func should throw a TypeError  Actual: ' + (e));  
   }
 }
 //
@@ -28,7 +28,7 @@ var __func = function (){return "ONE";};
 //CHECK#2
 var __result = __func();
 if (__result !== "ONE") {
-	$ERROR('#2: __result === "ONE". Actual: __result ==='+__result);
+	throw new Test262Error('#2: __result === "ONE". Actual: __result ==='+__result);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -39,7 +39,7 @@ __func = function (){return "TWO";};
 //CHECK#3
 var __result = __func();
 if (__result !== "TWO") {
-	$ERROR('#3: __result === "TWO". Actual: __result ==='+__result);
+	throw new Test262Error('#3: __result === "TWO". Actual: __result ==='+__result);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A17_T2.js b/test/language/statements/function/S13_A17_T2.js
index 044ebefb53..dca8e19f30 100644
--- a/test/language/statements/function/S13_A17_T2.js
+++ b/test/language/statements/function/S13_A17_T2.js
@@ -15,10 +15,10 @@ description: >
 //CHECK#1
 try{
     var __result = __func();
-	$ERROR("#1: var __result = __func() lead to throwing exception");
+	throw new Test262Error("#1: var __result = __func() lead to throwing exception");
 } catch(e) {
   if ((e instanceof TypeError) !== true) {
-    $ERROR('#1.2: func should throw a TypeError  Actual: ' + (e));  
+    throw new Test262Error('#1.2: func should throw a TypeError  Actual: ' + (e));  
   }
 }
 //
@@ -31,7 +31,7 @@ var __func = function __func(){return "ONE";};
 //CHECK#2
 var __result = __func();
 if (__result !== "ONE") {
-	$ERROR('#2: __result === "ONE". Actual: __result ==='+__result);
+	throw new Test262Error('#2: __result === "ONE". Actual: __result ==='+__result);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -42,7 +42,7 @@ __func = function __func(){return "TWO";};
 //CHECK#3
 var __result = __func();
 if (__result !== "TWO") {
-	$ERROR('#3: __result === "TWO". Actual: __result ==='+__result);
+	throw new Test262Error('#3: __result === "TWO". Actual: __result ==='+__result);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A18.js b/test/language/statements/function/S13_A18.js
index e1ec3b9e84..adca9e452e 100644
--- a/test/language/statements/function/S13_A18.js
+++ b/test/language/statements/function/S13_A18.js
@@ -10,7 +10,7 @@ description: Using a function declaration as a function parameter
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof sinx !== 'undefined') {
-	$ERROR('#1: typeof sinx === \'undefined\'. Actual: typeof sinx ==='+typeof sinx);
+	throw new Test262Error('#1: typeof sinx === \'undefined\'. Actual: typeof sinx ==='+typeof sinx);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -24,7 +24,7 @@ var __val = function derivative(f, dx) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (typeof sinx !== 'undefined') {
-	$ERROR('#2: typeof sinx === \'undefined\'. Actual: typeof sinx ==='+typeof sinx);
+	throw new Test262Error('#2: typeof sinx === \'undefined\'. Actual: typeof sinx ==='+typeof sinx);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A19_T1.js b/test/language/statements/function/S13_A19_T1.js
index ae1be8c98b..66eb32f7c5 100644
--- a/test/language/statements/function/S13_A19_T1.js
+++ b/test/language/statements/function/S13_A19_T1.js
@@ -13,7 +13,7 @@ description: >
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof __decl !== "function") {
-	$ERROR('#1: typeof __decl === "function". Actual: typeof __decl ==='+typeof __decl);
+	throw new Test262Error('#1: typeof __decl === "function". Actual: typeof __decl ==='+typeof __decl);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -24,7 +24,7 @@ var __decl = 1;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__decl !== 1) {
-	$ERROR('#2: __decl === 1. Actual: __decl ==='+__decl);
+	throw new Test262Error('#2: __decl === 1. Actual: __decl ==='+__decl);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A19_T2.js b/test/language/statements/function/S13_A19_T2.js
index f94f0dcfc4..2a367952c6 100644
--- a/test/language/statements/function/S13_A19_T2.js
+++ b/test/language/statements/function/S13_A19_T2.js
@@ -15,7 +15,7 @@ description: >
     //////////////////////////////////////////////////////////////////////////////
     //CHECK#1
     if (typeof __decl !== "function") {
-    	$ERROR('#1: typeof __decl === "function". Actual: typeof __decl ==='+typeof __decl);
+    	throw new Test262Error('#1: typeof __decl === "function". Actual: typeof __decl ==='+typeof __decl);
     }
     //
     //////////////////////////////////////////////////////////////////////////////
@@ -26,7 +26,7 @@ description: >
     //////////////////////////////////////////////////////////////////////////////
     //CHECK#2
     if (__decl !== 1) {
-    	$ERROR('#2: __decl === 1. Actual: __decl ==='+__decl);
+    	throw new Test262Error('#2: __decl === 1. Actual: __decl ==='+__decl);
     }
     //
     //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A2_T1.js b/test/language/statements/function/S13_A2_T1.js
index a761932101..7c53adcecd 100644
--- a/test/language/statements/function/S13_A2_T1.js
+++ b/test/language/statements/function/S13_A2_T1.js
@@ -12,7 +12,7 @@ var x = (function __func(arg){return arg})(1);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (x !== 1) {
-	$ERROR('#1: x === 1. Actual: x ==='+x);
+	throw new Test262Error('#1: x === 1. Actual: x ==='+x);
 }
 
 //
@@ -21,7 +21,7 @@ if (x !== 1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (typeof __func !== 'undefined') {
-	$ERROR('#2: typeof __func === \'undefined\'. Actual: typeof __func ==='+typeof __func);
+	throw new Test262Error('#2: typeof __func === \'undefined\'. Actual: typeof __func ==='+typeof __func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A2_T2.js b/test/language/statements/function/S13_A2_T2.js
index cee87be37a..c5202350b7 100644
--- a/test/language/statements/function/S13_A2_T2.js
+++ b/test/language/statements/function/S13_A2_T2.js
@@ -12,7 +12,7 @@ var x = (function __func(arg){return arg + arguments[1]})(1,"1");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (x !== "11") {
-	$ERROR('#1: x === "11". Actual: x ==='+x);
+	throw new Test262Error('#1: x === "11". Actual: x ==='+x);
 }
 
 //
@@ -21,7 +21,7 @@ if (x !== "11") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (typeof __func !== 'undefined') {
-	$ERROR('#2: typeof __func === \'undefined\'. Actual: typeof __func ==='+typeof __func);
+	throw new Test262Error('#2: typeof __func === \'undefined\'. Actual: typeof __func ==='+typeof __func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A2_T3.js b/test/language/statements/function/S13_A2_T3.js
index 64e553652f..4ddc7641d4 100644
--- a/test/language/statements/function/S13_A2_T3.js
+++ b/test/language/statements/function/S13_A2_T3.js
@@ -14,7 +14,7 @@ var x = (function __func(){return arguments[0] +"-"+ arguments[1]})("Obi","Wan")
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (x !== "Obi-Wan") {
-	$ERROR('#1: x === "Obi-Wan". Actual: x ==='+x);
+	throw new Test262Error('#1: x === "Obi-Wan". Actual: x ==='+x);
 }
 
 //
@@ -23,7 +23,7 @@ if (x !== "Obi-Wan") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (typeof __func !== 'undefined') {
-	$ERROR('#2: typeof __func === \'undefined\'. Actual: typeof __func ==='+typeof __func);
+	throw new Test262Error('#2: typeof __func === \'undefined\'. Actual: typeof __func ==='+typeof __func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A3_T1.js b/test/language/statements/function/S13_A3_T1.js
index d84d84dfeb..07aa642a43 100644
--- a/test/language/statements/function/S13_A3_T1.js
+++ b/test/language/statements/function/S13_A3_T1.js
@@ -25,7 +25,7 @@ var fact_of_3 =  __func(3);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (fact_of_3 !== 6) {
-	$ERROR("#1: fact_of_3 === 6. Actual: fact_of_3 ==="+fact_of_3);
+	throw new Test262Error("#1: fact_of_3 === 6. Actual: fact_of_3 ==="+fact_of_3);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A3_T2.js b/test/language/statements/function/S13_A3_T2.js
index bbb5082e08..76c1daf4ea 100644
--- a/test/language/statements/function/S13_A3_T2.js
+++ b/test/language/statements/function/S13_A3_T2.js
@@ -25,7 +25,7 @@ var fact_of_3 =  __func(3);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (fact_of_3 !== 6) {
-	$ERROR("#1: fact_of_3 === 6. Actual: fact_of_3 ==="+fact_of_3);
+	throw new Test262Error("#1: fact_of_3 === 6. Actual: fact_of_3 ==="+fact_of_3);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A3_T3.js b/test/language/statements/function/S13_A3_T3.js
index 500ceb1d9b..4d2dfd803a 100644
--- a/test/language/statements/function/S13_A3_T3.js
+++ b/test/language/statements/function/S13_A3_T3.js
@@ -23,7 +23,7 @@ var fact_of_3 =  __func(3);
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (fact_of_3 !== 6) {
-	$ERROR("#1: fact_of_3 === 6. Actual: fact_of_3 ==="+fact_of_3);
+	throw new Test262Error("#1: fact_of_3 === 6. Actual: fact_of_3 ==="+fact_of_3);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A4_T1.js b/test/language/statements/function/S13_A4_T1.js
index fe92303421..f85c2481d2 100644
--- a/test/language/statements/function/S13_A4_T1.js
+++ b/test/language/statements/function/S13_A4_T1.js
@@ -15,7 +15,7 @@ function __func(){return "zig-zig-sputnik";};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1 
 if (typeof __func !== "function") {
-	$ERROR('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func);
+	throw new Test262Error('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -23,7 +23,7 @@ if (typeof __func !== "function") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__func() !== "zig-zig-sputnik") {
-	$ERROR('#2: __func() === "zig-zig-sputnik". Actual: __func() ==='+__func());
+	throw new Test262Error('#2: __func() === "zig-zig-sputnik". Actual: __func() ==='+__func());
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A4_T2.js b/test/language/statements/function/S13_A4_T2.js
index e2e3a36e47..5908a7dfb8 100644
--- a/test/language/statements/function/S13_A4_T2.js
+++ b/test/language/statements/function/S13_A4_T2.js
@@ -17,7 +17,7 @@ function __func(arg){return ++arg;};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1 
 if (typeof __func !== "function") {
-	$ERROR('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func);
+	throw new Test262Error('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ if (typeof __func !== "function") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__func(1) !== 2) {
-	$ERROR('#2: __func(1) === 2. Actual: __func(1) ==='+__func(1));
+	throw new Test262Error('#2: __func(1) === 2. Actual: __func(1) ==='+__func(1));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A4_T3.js b/test/language/statements/function/S13_A4_T3.js
index a9ff4cea5e..c80130f6c0 100644
--- a/test/language/statements/function/S13_A4_T3.js
+++ b/test/language/statements/function/S13_A4_T3.js
@@ -17,7 +17,7 @@ function __func(arg1, arg2, arg3){return arg1+=(arg2+=arg3);};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1 
 if (typeof __func !== "function") {
-	$ERROR('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func);
+	throw new Test262Error('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ if (typeof __func !== "function") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__func(10, 20, 30) !== 60) {
-	$ERROR('#2: __func(10, 20, 30) === 60. Actual: __func(10,20,30) ==='+__func(10,20,30));
+	throw new Test262Error('#2: __func(10, 20, 30) === 60. Actual: __func(10,20,30) ==='+__func(10,20,30));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A4_T4.js b/test/language/statements/function/S13_A4_T4.js
index 4494af13ee..72938a68d5 100644
--- a/test/language/statements/function/S13_A4_T4.js
+++ b/test/language/statements/function/S13_A4_T4.js
@@ -17,7 +17,7 @@ function __func(){return arguments[0].name + " " + arguments[0].surname;};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1 
 if (typeof __func !== "function") {
-	$ERROR('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func);
+	throw new Test262Error('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ if (typeof __func !== "function") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__func({name:'fox', surname:'malder'}) !== "fox malder") {
-	$ERROR('#2: __func({name:\'fox\', surname:\'malder\'}) === "fox malder". Actual: __func({name:\'fox\', surname:\'malder\'}) ==='+__func({name:'fox', surname:'malder'}));
+	throw new Test262Error('#2: __func({name:\'fox\', surname:\'malder\'}) === "fox malder". Actual: __func({name:\'fox\', surname:\'malder\'}) ==='+__func({name:'fox', surname:'malder'}));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -35,7 +35,7 @@ function func__(arg){return arg.name + " " + arg.surname;};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3 
 if (typeof func__ !== "function") {
-	$ERROR('#3: typeof func__ === "function". Actual: typeof __func ==='+typeof __func);
+	throw new Test262Error('#3: typeof func__ === "function". Actual: typeof __func ==='+typeof __func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -43,7 +43,7 @@ if (typeof func__ !== "function") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if (func__({name:'john', surname:'lennon'}) !== "john lennon") {
-	$ERROR('#4: func__({name:\'john\', surname:\'lennon\'}) === "john lennon". Actual: __func({name:\'john\', surname:\'lennon\'}) ==='+__func({name:'john', surname:'lennon'}));
+	throw new Test262Error('#4: func__({name:\'john\', surname:\'lennon\'}) === "john lennon". Actual: __func({name:\'john\', surname:\'lennon\'}) ==='+__func({name:'john', surname:'lennon'}));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A6_T1.js b/test/language/statements/function/S13_A6_T1.js
index 0bf5ae1735..f9c0b62412 100644
--- a/test/language/statements/function/S13_A6_T1.js
+++ b/test/language/statements/function/S13_A6_T1.js
@@ -22,7 +22,7 @@ var __A = __func();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__store__func !== __func) {
-	$ERROR('#1: __store__func === __func. Actual: __store__func ==='+__store__func);
+	throw new Test262Error('#1: __store__func === __func. Actual: __store__func ==='+__store__func);
 }
 //
 ////////////////////////////////////////////////////////////////////////////// 
@@ -30,7 +30,7 @@ if (__store__func !== __func) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__1 !== __A) {
-	$ERROR('#2: __1 === __A. Actual: __1 ==='+__1);
+	throw new Test262Error('#2: __1 === __A. Actual: __1 ==='+__1);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A6_T2.js b/test/language/statements/function/S13_A6_T2.js
index 1016919cba..4401138dd8 100644
--- a/test/language/statements/function/S13_A6_T2.js
+++ b/test/language/statements/function/S13_A6_T2.js
@@ -14,10 +14,10 @@ description: Calling a function before it is declared one more time
 try{
     var __result = __func();
 } catch(e) {
-    $ERROR("#1: Function call can appears in the program before the FunctionDeclaration appears");
+    throw new Test262Error("#1: Function call can appears in the program before the FunctionDeclaration appears");
 }
 if (__result !== "SECOND") {
-	$ERROR('#1.1: __result === "SECOND". Actual: __result ==='+__result);
+	throw new Test262Error('#1.1: __result === "SECOND". Actual: __result ==='+__result);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -28,7 +28,7 @@ function __func(){return "FIRST";};
 //CHECK#2
 __result = __func();
 if (__result !== "SECOND") {
-	$ERROR('#2: __result === "SECOND". Actual: __result ==='+__result);
+	throw new Test262Error('#2: __result === "SECOND". Actual: __result ==='+__result);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A7_T1.js b/test/language/statements/function/S13_A7_T1.js
index 7c14554477..404032a93c 100644
--- a/test/language/statements/function/S13_A7_T1.js
+++ b/test/language/statements/function/S13_A7_T1.js
@@ -11,7 +11,7 @@ function __func(){'ground control to major tom'};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof __func !== "function") {
-	$ERROR('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func);
+	throw new Test262Error('#1: typeof __func === "function". Actual: typeof __func ==='+typeof __func);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -20,7 +20,7 @@ function __func__2(){b};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (typeof __func__2 !== "function") {
-	$ERROR('#2: typeof __func__2 === "function". Actual: typeof __func__2 ==='+typeof __func__2);
+	throw new Test262Error('#2: typeof __func__2 === "function". Actual: typeof __func__2 ==='+typeof __func__2);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -29,7 +29,7 @@ function __func__3(){1};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (typeof __func__3 !== "function") {
-	$ERROR('#3: typeof __func__3 === "function". Actual: typeof __func__3 ==='+typeof __func__3);
+	throw new Test262Error('#3: typeof __func__3 === "function". Actual: typeof __func__3 ==='+typeof __func__3);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -38,7 +38,7 @@ function __func__4(){1+c};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if (typeof __func__4 !== "function") {
-	$ERROR('#4: typeof __func__4 === "function". Actual: typeof __func__4 ==='+typeof __func__4);
+	throw new Test262Error('#4: typeof __func__4 === "function". Actual: typeof __func__4 ==='+typeof __func__4);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -47,7 +47,7 @@ function __func__5(){inc(d)};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#5
 if (typeof __func__5 !== "function") {
-	$ERROR('#5: typeof __func__5 === "function". Actual: typeof __func__5 ==='+typeof __func__5);
+	throw new Test262Error('#5: typeof __func__5 === "function". Actual: typeof __func__5 ==='+typeof __func__5);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -56,7 +56,7 @@ function __func__6(){var \u0042 = 1;};
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#6
 if (typeof __func__6 !== "function") {
-	$ERROR('#6: typeof __func__6 === "function". Actual: typeof __func__6 ==='+typeof __func__6);
+	throw new Test262Error('#6: typeof __func__6 === "function". Actual: typeof __func__6 ==='+typeof __func__6);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -65,7 +65,7 @@ if (typeof __func__6 !== "function") {
 ////////////////////////////////////////////////////////////////////////////////
 ////CHECK#7
 //if (typeof __func__7 !== "function") {
-//	$ERROR('#7: The FunctionBody must be SourceElements');
+//	throw new Test262Error('#7: The FunctionBody must be SourceElements');
 //}
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A8_T1.js b/test/language/statements/function/S13_A8_T1.js
index 07be720f96..99b9e87666 100644
--- a/test/language/statements/function/S13_A8_T1.js
+++ b/test/language/statements/function/S13_A8_T1.js
@@ -17,7 +17,7 @@ function __func(param1, param2, param3) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func('A') !== 1) {
- 	$ERROR('#1: __func(\'A\') === 1. Actual: __func(\'A\') ==='+__func('A'));
+ 	throw new Test262Error('#1: __func(\'A\') === 1. Actual: __func(\'A\') ==='+__func('A'));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ if (__func('A') !== 1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__func('A', 'B', 1, 2,__func) !== 5) {
-	$ERROR('#2: __func(\'A\', \'B\', 1, 2,__func) === 5. Actual: __func(\'A\', \'B\', 1, 2,__func) ==='+__func('A', 'B', 1, 2,__func));
+	throw new Test262Error('#2: __func(\'A\', \'B\', 1, 2,__func) === 5. Actual: __func(\'A\', \'B\', 1, 2,__func) ==='+__func('A', 'B', 1, 2,__func));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A8_T2.js b/test/language/statements/function/S13_A8_T2.js
index 778fde9179..64590f9983 100644
--- a/test/language/statements/function/S13_A8_T2.js
+++ b/test/language/statements/function/S13_A8_T2.js
@@ -16,7 +16,7 @@ function __func() {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func('A') !== 1) {
- 	$ERROR('#1: __func(\'A\') === 1. Actual: __func(\'A\') ==='+__func('A'));
+ 	throw new Test262Error('#1: __func(\'A\') === 1. Actual: __func(\'A\') ==='+__func('A'));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -24,7 +24,7 @@ if (__func('A') !== 1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__func('A', 'B', 1, 2,__func) !== 5) {
-	$ERROR('#2: __func(\'A\', \'B\', 1, 2,__func) === 5. Actual: __func(\'A\', \'B\', 1, 2,__func) ==='+__func('A', 'B', 1, 2,__func));
+	throw new Test262Error('#2: __func(\'A\', \'B\', 1, 2,__func) === 5. Actual: __func(\'A\', \'B\', 1, 2,__func) ==='+__func('A', 'B', 1, 2,__func));
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -32,7 +32,7 @@ if (__func('A', 'B', 1, 2,__func) !== 5) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__func() !== 0) {
-	$ERROR('#3: __func() === 0. Actual: __func() ==='+__func());
+	throw new Test262Error('#3: __func() === 0. Actual: __func() ==='+__func());
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S13_A9.js b/test/language/statements/function/S13_A9.js
index d15be5c50a..c545fcdef4 100644
--- a/test/language/statements/function/S13_A9.js
+++ b/test/language/statements/function/S13_A9.js
@@ -13,7 +13,7 @@ function __func__MULT(incrementator, arg, mult){ return incrementator(arg)*mult;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func__MULT(__func__INC, 2, 2) !== 6) {
-	$ERROR('#1: function  can be passed as argument');
+	throw new Test262Error('#1: function  can be passed as argument');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S14_A2.js b/test/language/statements/function/S14_A2.js
index e52dda0b72..60f6b8c627 100644
--- a/test/language/statements/function/S14_A2.js
+++ b/test/language/statements/function/S14_A2.js
@@ -10,7 +10,7 @@ description: Declaring a function within an "if" Expression
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof f !== 'undefined') {
-	$ERROR('#1: typeof f === \'undefined\'. Actual:  typeof f ==='+ typeof f  );
+	throw new Test262Error('#1: typeof f === \'undefined\'. Actual:  typeof f ==='+ typeof f  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -23,7 +23,7 @@ if (function f(arg){
 	else
 	   return f(arg-1)*arg;
 }(3)!==6) {
-	$ERROR('#2: FunctionDeclaration cannot be localed inside an Expression');
+	throw new Test262Error('#2: FunctionDeclaration cannot be localed inside an Expression');
 };
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S14_A3.js b/test/language/statements/function/S14_A3.js
index 6881a918be..69f75e07d1 100644
--- a/test/language/statements/function/S14_A3.js
+++ b/test/language/statements/function/S14_A3.js
@@ -12,7 +12,7 @@ description: Declaring a function within the body of another function
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof __func !== "function") {
-	$ERROR('#1: typeof __func === "function". Actual:  typeof __func ==='+ typeof __func  );
+	throw new Test262Error('#1: typeof __func === "function". Actual:  typeof __func ==='+ typeof __func  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -20,7 +20,7 @@ if (typeof __func !== "function") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (typeof __gunc !== "undefined") {
-	$ERROR('#2: typeof __gunc === "undefined". Actual:  typeof __gunc ==='+ typeof __gunc  );
+	throw new Test262Error('#2: typeof __gunc === "undefined". Actual:  typeof __gunc ==='+ typeof __gunc  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S14_A5_T1.js b/test/language/statements/function/S14_A5_T1.js
index b731f42ae2..c7f081a7a3 100644
--- a/test/language/statements/function/S14_A5_T1.js
+++ b/test/language/statements/function/S14_A5_T1.js
@@ -14,7 +14,7 @@ description: >
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func() !== "both") {
-	$ERROR('#1: __func() === "both". Actual:  __func() ==='+ __func()  );
+	throw new Test262Error('#1: __func() === "both". Actual:  __func() ==='+ __func()  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/S14_A5_T2.js b/test/language/statements/function/S14_A5_T2.js
index cb62d64752..95ec5bcf50 100644
--- a/test/language/statements/function/S14_A5_T2.js
+++ b/test/language/statements/function/S14_A5_T2.js
@@ -14,7 +14,7 @@ description: >
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__func() !== "unicode") {
-	$ERROR('#1: __func() === "unicode". Actual:  __func() ==='+ __func()  );
+	throw new Test262Error('#1: __func() === "unicode". Actual:  __func() ==='+ __func()  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/function/name-unicode.js b/test/language/statements/function/name-unicode.js
index 1a88dd780d..a2c194ebe0 100644
--- a/test/language/statements/function/name-unicode.js
+++ b/test/language/statements/function/name-unicode.js
@@ -12,7 +12,7 @@ var funcA = eval("function __func\u0041(__arg){return __arg;}; __funcA");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof funcA !== "function") {
-    $ERROR('#1: unicode symbols in function name are allowed');
+    throw new Test262Error('#1: unicode symbols in function name are allowed');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/if/S12.5_A1.1_T1.js b/test/language/statements/if/S12.5_A1.1_T1.js
index 982b164c7d..5aefb459ed 100644
--- a/test/language/statements/if/S12.5_A1.1_T1.js
+++ b/test/language/statements/if/S12.5_A1.1_T1.js
@@ -13,41 +13,41 @@ description: Using "if" without "else" construction
 //CHECK#1
 
 if(0)
-	$ERROR('#1: 0 in expression is evaluated to false ');
+	throw new Test262Error('#1: 0 in expression is evaluated to false ');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(false)
-    $ERROR('#2: false in expression is evaluated to false ');
+    throw new Test262Error('#2: false in expression is evaluated to false ');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(null)
-	$ERROR('#3: null in expression is evaluated to false ');
+	throw new Test262Error('#3: null in expression is evaluated to false ');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if(undefined)
-	$ERROR('#4: undefined in expression is evaluated to false ');
+	throw new Test262Error('#4: undefined in expression is evaluated to false ');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#5
 if("")
-    $ERROR('#5: empty string in expression is evaluated to false ');
+    throw new Test262Error('#5: empty string in expression is evaluated to false ');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#6
 if(NaN)
-    $ERROR('#5: NaN in expression is evaluated to false ');
+    throw new Test262Error('#5: NaN in expression is evaluated to false ');
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/if/S12.5_A1.1_T2.js b/test/language/statements/if/S12.5_A1.1_T2.js
index f51e026889..f6e90dc23a 100644
--- a/test/language/statements/if/S12.5_A1.1_T2.js
+++ b/test/language/statements/if/S12.5_A1.1_T2.js
@@ -13,59 +13,59 @@ var c=0;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(0)
-	$ERROR('#1.1: 0 in expression is evaluated to false ');
+	throw new Test262Error('#1.1: 0 in expression is evaluated to false ');
 else
   c++;
-if (c!=1) $ERROR('#1.2: else branch don`t execute');
+if (c!=1) throw new Test262Error('#1.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(false)
-    $ERROR('#2.1: false in expression is evaluated to false ');
+    throw new Test262Error('#2.1: false in expression is evaluated to false ');
 else
   c++;
-if (c!=2) $ERROR('#2.2: else branch don`t execute');
+if (c!=2) throw new Test262Error('#2.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(null)
-	$ERROR('#3.1: null in expression is evaluated to false ');
+	throw new Test262Error('#3.1: null in expression is evaluated to false ');
 else
   c++;
-if (c!=3) $ERROR('#3.2: else branch don`t execute');
+if (c!=3) throw new Test262Error('#3.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if(undefined)
-	$ERROR('#4.1: undefined in expression is evaluated to false ');
+	throw new Test262Error('#4.1: undefined in expression is evaluated to false ');
 else
   c++;
-if (c!=4) $ERROR('#4.2: else branch don`t execute');
+if (c!=4) throw new Test262Error('#4.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#5
 if("")
-    $ERROR('#5.1: empty string in expression is evaluated to false ');
+    throw new Test262Error('#5.1: empty string in expression is evaluated to false ');
 else
   c++;
-if (c!=5) $ERROR('#5.2: else branch don`t execute');
+if (c!=5) throw new Test262Error('#5.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#6
 if(NaN)
-    $ERROR('#6.1: NaN in expression is evaluated to false ');
+    throw new Test262Error('#6.1: NaN in expression is evaluated to false ');
 else
   c++;
-if (c!=6) $ERROR('#6.2: else branch don`t execute');
+if (c!=6) throw new Test262Error('#6.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/if/S12.5_A1.2_T1.js b/test/language/statements/if/S12.5_A1.2_T1.js
index b50a76b23f..4303852898 100644
--- a/test/language/statements/if/S12.5_A1.2_T1.js
+++ b/test/language/statements/if/S12.5_A1.2_T1.js
@@ -12,62 +12,62 @@ description: Using "if" without "else" construction
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(!(new Number(1)))
-	$ERROR('#1: new 1 in expression is evaluated to true');
+	throw new Test262Error('#1: new 1 in expression is evaluated to true');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(!(new Boolean(true)))
-	$ERROR('#2: new true in expression is evaluated to true');
+	throw new Test262Error('#2: new true in expression is evaluated to true');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(!(new String("1")))
-	$ERROR('#3: new "1" in expression is evaluated to true');
+	throw new Test262Error('#3: new "1" in expression is evaluated to true');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if(!(new String("A")))
-	$ERROR('#4: new "A" in expression is evaluated to true');
+	throw new Test262Error('#4: new "A" in expression is evaluated to true');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#5
 if(!(new Boolean(false)))
-    $ERROR('#2: new false in expression is evaluated to true ');
+    throw new Test262Error('#2: new false in expression is evaluated to true ');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#6
 if(!(new Number(NaN)))
-    $ERROR('#6: new NaN in expression is evaluated to true ');
+    throw new Test262Error('#6: new NaN in expression is evaluated to true ');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#7
 if(!(new Number(null)))
-  $ERROR('#7: new null in expression is evaluated to true ');
+  throw new Test262Error('#7: new null in expression is evaluated to true ');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#8
 if(!(new String(undefined)))
-  $ERROR('#8: new undefined in expression is evaluated to true ');
+  throw new Test262Error('#8: new undefined in expression is evaluated to true ');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#9
 if(!(new String("")))
-    $ERROR('#9: new empty string in expression is evaluated to true ');
+    throw new Test262Error('#9: new empty string in expression is evaluated to true ');
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/if/S12.5_A1.2_T2.js b/test/language/statements/if/S12.5_A1.2_T2.js
index 34a0e9d136..c1443f41cb 100644
--- a/test/language/statements/if/S12.5_A1.2_T2.js
+++ b/test/language/statements/if/S12.5_A1.2_T2.js
@@ -13,89 +13,89 @@ var c=0;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(!(new Number(1)))
-	$ERROR('#1.1: new 1 in expression is evaluated to true');
+	throw new Test262Error('#1.1: new 1 in expression is evaluated to true');
 else
   c++;
-if (c!=1) $ERROR('#1.2: else branch don`t execute');
+if (c!=1) throw new Test262Error('#1.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(!(new Boolean(true)))
-	$ERROR('#2.1: new true in expression is evaluated to true');
+	throw new Test262Error('#2.1: new true in expression is evaluated to true');
 else
   c++;
-if (c!=2) $ERROR('#2.2: else branch don`t execute');
+if (c!=2) throw new Test262Error('#2.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(!(new String("1")))
-	$ERROR('#3.1: new "1" in expression is evaluated to true');
+	throw new Test262Error('#3.1: new "1" in expression is evaluated to true');
 else
   c++;
-if (c!=3) $ERROR('#3.2: else branch don`t execute');
+if (c!=3) throw new Test262Error('#3.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if(!(new String("A")))
-	$ERROR('#4.1: new "A" in expression is evaluated to true');
+	throw new Test262Error('#4.1: new "A" in expression is evaluated to true');
 else
   c++;
-if (c!=4) $ERROR('#4.2: else branch don`t execute');
+if (c!=4) throw new Test262Error('#4.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#5
 if(!(new Boolean(false)))
-    $ERROR('#5.1: new false in expression is evaluated to true ');
+    throw new Test262Error('#5.1: new false in expression is evaluated to true ');
 else
   c++;
-if (c!=5) $ERROR('#5.2: else branch don`t execute');
+if (c!=5) throw new Test262Error('#5.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#6
 if(!(new Number(NaN)))
-    $ERROR('#6.1: new NaN in expression is evaluated to true ');
+    throw new Test262Error('#6.1: new NaN in expression is evaluated to true ');
 else
   c++;
-if (c!=6) $ERROR('#6.2: else branch don`t execute');
+if (c!=6) throw new Test262Error('#6.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#7
 if(!(new Number(null)))
-  $ERROR('#7.1: new null in expression is evaluated to true ');
+  throw new Test262Error('#7.1: new null in expression is evaluated to true ');
 else
   c++;
-if (c!=7) $ERROR('#7.2: else branch don`t execute');
+if (c!=7) throw new Test262Error('#7.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#8
 if(!(new String(undefined)))
-  $ERROR('#8.1: new undefined in expression is evaluated to true ');
+  throw new Test262Error('#8.1: new undefined in expression is evaluated to true ');
 else
   c++;
-if (c!=8) $ERROR('#8.2: else branch don`t execute');
+if (c!=8) throw new Test262Error('#8.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#9
 if(!(new String("")))
-    $ERROR('#9.1: new empty string in expression is evaluated to true ');
+    throw new Test262Error('#9.1: new empty string in expression is evaluated to true ');
 else
   c++;
-if (c!=9) $ERROR('#9.2: else branch don`t execute');
+if (c!=9) throw new Test262Error('#9.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/if/S12.5_A10_T1.js b/test/language/statements/if/S12.5_A10_T1.js
index 21005ed4d9..3d7d03aab5 100644
--- a/test/language/statements/if/S12.5_A10_T1.js
+++ b/test/language/statements/if/S12.5_A10_T1.js
@@ -14,7 +14,7 @@ description: >
 if(function __func(){return 0;}){
     ;
 }else {
-    $ERROR('#1: Function expession inside the "if" expression is allowed');
+    throw new Test262Error('#1: Function expession inside the "if" expression is allowed');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/if/S12.5_A10_T2.js b/test/language/statements/if/S12.5_A10_T2.js
index 7e09becf72..4cdc749a71 100644
--- a/test/language/statements/if/S12.5_A10_T2.js
+++ b/test/language/statements/if/S12.5_A10_T2.js
@@ -12,7 +12,7 @@ description: >
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#
 if(function __func(){return 0;}()){
-    $ERROR('#1: Function expession inside the if expression is allowed');
+    throw new Test262Error('#1: Function expession inside the if expression is allowed');
 }else {
     ;
 }
diff --git a/test/language/statements/if/S12.5_A12_T1.js b/test/language/statements/if/S12.5_A12_T1.js
index bc8cf859f5..be2ed14d68 100644
--- a/test/language/statements/if/S12.5_A12_T1.js
+++ b/test/language/statements/if/S12.5_A12_T1.js
@@ -10,47 +10,47 @@ description: Using embedded "if/else" into "if/else" constructions
 //CHECK# 1
 if(true)
   if (false)
-    $ERROR('#1.1: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#1.1: At embedded "if/else" constructions engine must select right branches');
   else
     ;
 else 
   if (true)
-    $ERROR('#1.2: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#1.2: At embedded "if/else" constructions engine must select right branches');
   else
-    $ERROR('#1.3: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#1.3: At embedded "if/else" constructions engine must select right branches');
 
 //CHECK# 2
 if(true)
   if (true)
     ;
   else
-    $ERROR('#2.1: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#2.1: At embedded "if/else" constructions engine must select right branches');
 else 
   if (true)
-    $ERROR('#2.2: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#2.2: At embedded "if/else" constructions engine must select right branches');
   else
-    $ERROR('#2.3: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#2.3: At embedded "if/else" constructions engine must select right branches');
 
 //CHECK# 3
 if(false)
   if (true)
-    $ERROR('#3.1: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#3.1: At embedded "if/else" constructions engine must select right branches');
   else
-    $ERROR('#3.2: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#3.2: At embedded "if/else" constructions engine must select right branches');
 else 
   if (true)
     ;
   else
-    $ERROR('#3.3: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#3.3: At embedded "if/else" constructions engine must select right branches');
 
 //CHECK# 4
 if(false)
   if (true)
-    $ERROR('#4.1: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#4.1: At embedded "if/else" constructions engine must select right branches');
   else
-    $ERROR('#4.2: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#4.2: At embedded "if/else" constructions engine must select right branches');
 else 
   if (false)
-    $ERROR('#4.3: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#4.3: At embedded "if/else" constructions engine must select right branches');
   else
     ;
diff --git a/test/language/statements/if/S12.5_A12_T2.js b/test/language/statements/if/S12.5_A12_T2.js
index 17a267c02a..589bb1f197 100644
--- a/test/language/statements/if/S12.5_A12_T2.js
+++ b/test/language/statements/if/S12.5_A12_T2.js
@@ -10,11 +10,11 @@ description: Using embedded "if" into "if/else" constructions
 //CHECK# 1
 if(true){
   if (false)
-    $ERROR('#1.1: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#1.1: At embedded "if/else" constructions engine must select right branches');
 }
 else{ 
   if (true)
-    $ERROR('#1.2: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#1.2: At embedded "if/else" constructions engine must select right branches');
 }
 
 //CHECK# 2
@@ -24,13 +24,13 @@ if(true){
 }
 else{ 
   if (true)
-    $ERROR('#2.2: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#2.2: At embedded "if/else" constructions engine must select right branches');
 }
 
 //CHECK# 3
 if(false){
   if (true)
-    $ERROR('#3.1: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#3.1: At embedded "if/else" constructions engine must select right branches');
 }
 else{ 
   if (true)
@@ -40,9 +40,9 @@ else{
 //CHECK# 4
 if(false){
   if (true)
-    $ERROR('#4.1: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#4.1: At embedded "if/else" constructions engine must select right branches');
 }
 else{ 
   if (false)
-    $ERROR('#4.3: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#4.3: At embedded "if/else" constructions engine must select right branches');
 }
diff --git a/test/language/statements/if/S12.5_A12_T3.js b/test/language/statements/if/S12.5_A12_T3.js
index 0e6d987c10..d0ab593876 100644
--- a/test/language/statements/if/S12.5_A12_T3.js
+++ b/test/language/statements/if/S12.5_A12_T3.js
@@ -10,7 +10,7 @@ description: Using embedded "if/else" into "if" without "else" constructions
 //CHECK# 1
 if(true)
   if (false)
-    $ERROR('#1.1: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#1.1: At embedded "if/else" constructions engine must select right branches');
   else
     ;
 
@@ -19,18 +19,18 @@ if(true)
   if (true)
     ;
   else
-    $ERROR('#2.1: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#2.1: At embedded "if/else" constructions engine must select right branches');
 
 //CHECK# 3
 if(false)
   if (true)
-    $ERROR('#3.1: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#3.1: At embedded "if/else" constructions engine must select right branches');
   else
-    $ERROR('#3.2: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#3.2: At embedded "if/else" constructions engine must select right branches');
 
 //CHECK# 4
 if(false)
   if (true)
-    $ERROR('#4.1: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#4.1: At embedded "if/else" constructions engine must select right branches');
   else
-    $ERROR('#4.2: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#4.2: At embedded "if/else" constructions engine must select right branches');
diff --git a/test/language/statements/if/S12.5_A12_T4.js b/test/language/statements/if/S12.5_A12_T4.js
index 39df51bff2..bfbdeaf129 100644
--- a/test/language/statements/if/S12.5_A12_T4.js
+++ b/test/language/statements/if/S12.5_A12_T4.js
@@ -10,7 +10,7 @@ description: Using embedded "if" into "if" constructions
 //CHECK# 1
 if(true)
   if (false)
-    $ERROR('#1.1: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#1.1: At embedded "if/else" constructions engine must select right branches');
 
 //CHECK# 2
 var c=0;
@@ -18,14 +18,14 @@ if(true)
   if (true)
     c=2;
 if (c!==2)
-    $ERROR('#2: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#2: At embedded "if/else" constructions engine must select right branches');
 
 //CHECK# 3
 if(false)
   if (true)
-    $ERROR('#3.1: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#3.1: At embedded "if/else" constructions engine must select right branches');
 
 //CHECK# 4
 if(false)
   if (true)
-    $ERROR('#4.1: At embedded "if/else" constructions engine must select right branches');
+    throw new Test262Error('#4.1: At embedded "if/else" constructions engine must select right branches');
diff --git a/test/language/statements/if/S12.5_A1_T1.js b/test/language/statements/if/S12.5_A1_T1.js
index 1a3dbbb03b..9b26582402 100644
--- a/test/language/statements/if/S12.5_A1_T1.js
+++ b/test/language/statements/if/S12.5_A1_T1.js
@@ -10,27 +10,27 @@ description: Using "if" without "else" construction
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(!(1))
-	$ERROR('#1: 1 in expression is evaluated to true');
+	throw new Test262Error('#1: 1 in expression is evaluated to true');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(!(true))
-	$ERROR('#2: true in expression is evaluated to true');
+	throw new Test262Error('#2: true in expression is evaluated to true');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(!("1"))
-	$ERROR('#3: "1" in expression is evaluated to true');
+	throw new Test262Error('#3: "1" in expression is evaluated to true');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if(!("A"))
-	$ERROR('#4: "A" in expression is evaluated to true');
+	throw new Test262Error('#4: "A" in expression is evaluated to true');
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/if/S12.5_A1_T2.js b/test/language/statements/if/S12.5_A1_T2.js
index d36d6d150d..0c1485adc5 100644
--- a/test/language/statements/if/S12.5_A1_T2.js
+++ b/test/language/statements/if/S12.5_A1_T2.js
@@ -11,39 +11,39 @@ var c=0;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(!(1))
-	$ERROR('#1.1: 1 in expression is evaluated to true');
+	throw new Test262Error('#1.1: 1 in expression is evaluated to true');
 else
   c++;
-if (c!=1) $ERROR('#1.2: else branch don`t execute');
+if (c!=1) throw new Test262Error('#1.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(!(true))
-	$ERROR('#2.1: true in expression is evaluated to true');
+	throw new Test262Error('#2.1: true in expression is evaluated to true');
 else
   c++;
-if (c!=2) $ERROR('#2.2: else branch don`t execute');
+if (c!=2) throw new Test262Error('#2.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(!("1"))
-	$ERROR('#3.1: "1" in expression is evaluated to true');
+	throw new Test262Error('#3.1: "1" in expression is evaluated to true');
 else
   c++;
-if (c!=3) $ERROR('#3.2: else branch don`t execute');
+if (c!=3) throw new Test262Error('#3.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if(!("A"))
-	$ERROR('#4.1: "A" in expression is evaluated to true');
+	throw new Test262Error('#4.1: "A" in expression is evaluated to true');
 else
   c++;
-if (c!=4) $ERROR('#4.2: else branch don`t execute');
+if (c!=4) throw new Test262Error('#4.2: else branch don`t execute');
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/if/S12.5_A2.js b/test/language/statements/if/S12.5_A2.js
index 7b36e2eea0..89d47f013a 100644
--- a/test/language/statements/if/S12.5_A2.js
+++ b/test/language/statements/if/S12.5_A2.js
@@ -9,5 +9,5 @@ description: Checking by using eval "eval("true")"
 
 if (eval("true")) {
 } else {
-    $ERROR('#1: In the "if" Statement eval as Expression is admitted'); 
+    throw new Test262Error('#1: In the "if" Statement eval as Expression is admitted'); 
 }
diff --git a/test/language/statements/if/S12.5_A3.js b/test/language/statements/if/S12.5_A3.js
index b40eadd97b..43b1389d43 100644
--- a/test/language/statements/if/S12.5_A3.js
+++ b/test/language/statements/if/S12.5_A3.js
@@ -15,7 +15,7 @@ try {
 	if ((function(){throw 1})()) abracadabra
 } catch (e) {
 	if (e !== 1) {
-		$ERROR('#1: Exception === 1. Actual:  Exception ==='+ e);
+		throw new Test262Error('#1: Exception === 1. Actual:  Exception ==='+ e);
 	}
 }
 //
@@ -27,7 +27,7 @@ try {
 	if ((function(){throw 1})()) abracadabra; else blablachat;
 } catch (e) {
 	if (e !== 1) {
-		$ERROR('#2: Exception === 1. Actual:  Exception ==='+ e);
+		throw new Test262Error('#2: Exception === 1. Actual:  Exception ==='+ e);
 	}
 }
 //
diff --git a/test/language/statements/if/S12.5_A4.js b/test/language/statements/if/S12.5_A4.js
index df8c99e516..dfff173132 100644
--- a/test/language/statements/if/S12.5_A4.js
+++ b/test/language/statements/if/S12.5_A4.js
@@ -13,10 +13,10 @@ description: The first statement is "(function(){throw "instatement"})()"
 //CHECK#1
 try {
 	if (true) (function(){throw "instatement"})();
-	$ERROR("#1 failed")
+	throw new Test262Error("#1 failed")
 } catch (e) {
 	if (e !== "instatement") {
-		$ERROR('#1: Exception === "instatement". Actual:  Exception ==='+ e);
+		throw new Test262Error('#1: Exception === "instatement". Actual:  Exception ==='+ e);
 	}
 }
 //
@@ -26,10 +26,10 @@ try {
 //CHECK#2
 try {
 	if (false) (function(){throw "truebranch"})(); (function(){throw "missbranch"})();
-	$ERROR("#2 failed")
+	throw new Test262Error("#2 failed")
 } catch (e) {
 	if (e !== "missbranch") {
-		$ERROR('#2: Exception === "missbranch". Actual:  Exception ==='+ e);
+		throw new Test262Error('#2: Exception === "missbranch". Actual:  Exception ==='+ e);
 	}
 }
 //
diff --git a/test/language/statements/if/S12.5_A5.js b/test/language/statements/if/S12.5_A5.js
index 450c7d6707..a6cdcca9b1 100644
--- a/test/language/statements/if/S12.5_A5.js
+++ b/test/language/statements/if/S12.5_A5.js
@@ -15,7 +15,7 @@ description: >
 //CHECK#1
 try {
 	__func=__func;
-	$ERROR('#1: "__func=__func" lead to throwing exception');
+	throw new Test262Error('#1: "__func=__func" lead to throwing exception');
 } catch (e) {
 	;
 }
@@ -29,7 +29,7 @@ try {
 	if(function __func(){throw "FunctionExpression";}) (function(){throw "TrueBranch"})(); else (function(){"MissBranch"})();
 } catch (e) {
 	if (e !== "TrueBranch") {
-		$ERROR('#2: Exception ==="TrueBranch". Actual:  Exception ==='+ e);
+		throw new Test262Error('#2: Exception ==="TrueBranch". Actual:  Exception ==='+ e);
 	}
 }
 //
@@ -39,7 +39,7 @@ try {
 //CHECK#3
 try {
 	__func=__func;
-	$ERROR('#3: "__func=__func" lead to throwing exception');
+	throw new Test262Error('#3: "__func=__func" lead to throwing exception');
 } catch (e) {
 	;
 }
diff --git a/test/language/statements/labeled/S12.12_A1_T1.js b/test/language/statements/labeled/S12.12_A1_T1.js
index db21f56fdf..99f73802f2 100644
--- a/test/language/statements/labeled/S12.12_A1_T1.js
+++ b/test/language/statements/labeled/S12.12_A1_T1.js
@@ -17,5 +17,5 @@ lbl: for(var i in object){
 }
 
 if(!(result === 1)){
-  $ERROR("'break label' should break execution of labelled iteration statement");
+  throw new Test262Error("'break label' should break execution of labelled iteration statement");
 }
diff --git a/test/language/statements/return/S12.9_A3.js b/test/language/statements/return/S12.9_A3.js
index 90301840e6..bf15b7a806 100644
--- a/test/language/statements/return/S12.9_A3.js
+++ b/test/language/statements/return/S12.9_A3.js
@@ -13,7 +13,7 @@ __evaluated = (function (){return;})();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__evaluated !== undefined) {
-	$ERROR('#1: If Expression is omitted, the return value is undefined');
+	throw new Test262Error('#1: If Expression is omitted, the return value is undefined');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/return/S12.9_A4.js b/test/language/statements/return/S12.9_A4.js
index 5468564f0c..48c9df7c28 100644
--- a/test/language/statements/return/S12.9_A4.js
+++ b/test/language/statements/return/S12.9_A4.js
@@ -22,7 +22,7 @@ DDsin = DD_operator(Math.sin, 0.00001);
 //CHECK#1
 // ((sin(x))')' = -sin(x)
 if (DDsin( Math.PI/2 ) + Math.sin( Math.PI/2 ) > 0.00001) {
-	$ERROR('#1: return Expression yields to Return (return, GetValue(Evaluate Expression), empty)');
+	throw new Test262Error('#1: return Expression yields to Return (return, GetValue(Evaluate Expression), empty)');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/return/S12.9_A5.js b/test/language/statements/return/S12.9_A5.js
index e93211bb80..bc8bcc75c1 100644
--- a/test/language/statements/return/S12.9_A5.js
+++ b/test/language/statements/return/S12.9_A5.js
@@ -15,7 +15,7 @@ function myfunc1(){
 	x1*=2;
 }
 myfunc1();
-if (x1!==2) $ERROR('#1: x1 === 2. Actual:  x1 ==='+ x1  );
+if (x1!==2) throw new Test262Error('#1: x1 === 2. Actual:  x1 ==='+ x1  );
 
 //CHECK#2
 var x2=1;
@@ -25,7 +25,7 @@ function myfunc2(){
   x2*=2;
 }
 myfunc2();
-if (x2!==2) $ERROR('#2: x2 === 2. Actual:  x2 ==='+ x2  );
+if (x2!==2) throw new Test262Error('#2: x2 === 2. Actual:  x2 ==='+ x2  );
 
 //CHECK#3
 var x3=1;
@@ -35,4 +35,4 @@ function myfunc3(){
   return x3;
   x3*=2;
 }
-if (myfunc3()!==undefined) $ERROR('#3: myfunc3() === undefined. Actual:  myfunc3() ==='+ myfunc3()  );
+if (myfunc3()!==undefined) throw new Test262Error('#3: myfunc3() === undefined. Actual:  myfunc3() ==='+ myfunc3()  );
diff --git a/test/language/statements/switch/S12.11_A1_T1.js b/test/language/statements/switch/S12.11_A1_T1.js
index 1cf7a5172b..12ac50bff6 100644
--- a/test/language/statements/switch/S12.11_A1_T1.js
+++ b/test/language/statements/switch/S12.11_A1_T1.js
@@ -33,41 +33,41 @@ function SwitchTest(value){
 }
         
 if(!(SwitchTest(0) === 6)){
-  $ERROR("#1: SwitchTest(0) === 6. Actual:  SwitchTest(0) ==="+ SwitchTest(0)  );
+  throw new Test262Error("#1: SwitchTest(0) === 6. Actual:  SwitchTest(0) ==="+ SwitchTest(0)  );
 }
 
 if(!(SwitchTest(1) === 4)){
-  $ERROR("#2: SwitchTest(1) === 4. Actual:  SwitchTest(1) ==="+ SwitchTest(1)  );
+  throw new Test262Error("#2: SwitchTest(1) === 4. Actual:  SwitchTest(1) ==="+ SwitchTest(1)  );
 }
 
 if(!(SwitchTest(2) === 56)){
-  $ERROR("#3: SwitchTest(2) === 56. Actual:  SwitchTest(2) ==="+ SwitchTest(2)  );
+  throw new Test262Error("#3: SwitchTest(2) === 56. Actual:  SwitchTest(2) ==="+ SwitchTest(2)  );
 }
 
 if(!(SwitchTest(3) === 48)){
-  $ERROR("#4: SwitchTest(3) === 48. Actual:  SwitchTest(3) ==="+ SwitchTest(3)  );
+  throw new Test262Error("#4: SwitchTest(3) === 48. Actual:  SwitchTest(3) ==="+ SwitchTest(3)  );
 }
 
 if(!(SwitchTest(4) === 64)){
-  $ERROR("#5: SwitchTest(4) === 64. Actual:  SwitchTest(4) ==="+ SwitchTest(4)  );
+  throw new Test262Error("#5: SwitchTest(4) === 64. Actual:  SwitchTest(4) ==="+ SwitchTest(4)  );
 }
 
 if(!(SwitchTest(true) === 32)){
-  $ERROR("#6: SwitchTest(true) === 32. Actual:  SwitchTest(true) ==="+ SwitchTest(true)  );
+  throw new Test262Error("#6: SwitchTest(true) === 32. Actual:  SwitchTest(true) ==="+ SwitchTest(true)  );
 }
 
 if(!(SwitchTest(false) === 32)){
-  $ERROR("#7: SwitchTest(false) === 32. Actual:  SwitchTest(false) ==="+ SwitchTest(false)  );
+  throw new Test262Error("#7: SwitchTest(false) === 32. Actual:  SwitchTest(false) ==="+ SwitchTest(false)  );
 }
 
 if(!(SwitchTest(null) === 32)){
-  $ERROR("#8: SwitchTest(null) === 32. Actual:  SwitchTest(null) ==="+ SwitchTest(null)  );
+  throw new Test262Error("#8: SwitchTest(null) === 32. Actual:  SwitchTest(null) ==="+ SwitchTest(null)  );
 }
 
 if(!(SwitchTest(void 0) === 32)){
-  $ERROR("#9: SwitchTest(void 0) === 32. Actual:  SwitchTest(void 0) ==="+ SwitchTest(void 0)  );
+  throw new Test262Error("#9: SwitchTest(void 0) === 32. Actual:  SwitchTest(void 0) ==="+ SwitchTest(void 0)  );
 }
 
 if(!(SwitchTest('0') === 32)){
-  $ERROR("#10: SwitchTest('0') === 32. Actual:  SwitchTest('0') ==="+ SwitchTest('0')  );
+  throw new Test262Error("#10: SwitchTest('0') === 32. Actual:  SwitchTest('0') ==="+ SwitchTest('0')  );
 }
diff --git a/test/language/statements/switch/S12.11_A1_T2.js b/test/language/statements/switch/S12.11_A1_T2.js
index e715af6758..26f4deca9a 100644
--- a/test/language/statements/switch/S12.11_A1_T2.js
+++ b/test/language/statements/switch/S12.11_A1_T2.js
@@ -43,45 +43,45 @@ function SwitchTest(value){
 }
         
 if(!(SwitchTest(0) === 6)){
-  $ERROR("#1: SwitchTest(0) === 6. Actual:  SwitchTest(0) ==="+ SwitchTest(0)  );
+  throw new Test262Error("#1: SwitchTest(0) === 6. Actual:  SwitchTest(0) ==="+ SwitchTest(0)  );
 }
 
 if(!(SwitchTest(1) === 512)){
-  $ERROR("#2: SwitchTest(1) === 512. Actual:  SwitchTest(1) ==="+ SwitchTest(1)  );
+  throw new Test262Error("#2: SwitchTest(1) === 512. Actual:  SwitchTest(1) ==="+ SwitchTest(1)  );
 }
 
 if(!(SwitchTest(2) === 32)){
-  $ERROR("#3: SwitchTest(2) === 32. Actual:  SwitchTest(2) ==="+ SwitchTest(2)  );
+  throw new Test262Error("#3: SwitchTest(2) === 32. Actual:  SwitchTest(2) ==="+ SwitchTest(2)  );
 }
 
 if(!(SwitchTest(3) === 48)){
-  $ERROR("#4: SwitchTest(3) === 48. Actual:  SwitchTest(3) ==="+ SwitchTest(3)  );
+  throw new Test262Error("#4: SwitchTest(3) === 48. Actual:  SwitchTest(3) ==="+ SwitchTest(3)  );
 }
 
 if(!(SwitchTest(4) === 64)){
-  $ERROR("#5: SwitchTest(4) === 64. Actual:  SwitchTest(4) ==="+ SwitchTest(4)  );
+  throw new Test262Error("#5: SwitchTest(4) === 64. Actual:  SwitchTest(4) ==="+ SwitchTest(4)  );
 }
 
 if(!(SwitchTest(true) === 32)){
-  $ERROR("#6: SwitchTest(true) === 32. Actual:  SwitchTest(true) ==="+ SwitchTest(true)  );
+  throw new Test262Error("#6: SwitchTest(true) === 32. Actual:  SwitchTest(true) ==="+ SwitchTest(true)  );
 }
 
 if(!(SwitchTest(false) === 32)){
-  $ERROR("#7: SwitchTest(false) === 32. Actual:  SwitchTest(false) ==="+ SwitchTest(false)  );
+  throw new Test262Error("#7: SwitchTest(false) === 32. Actual:  SwitchTest(false) ==="+ SwitchTest(false)  );
 }
 
 if(!(SwitchTest(null) === 32)){
-  $ERROR("#8: SwitchTest(null) === 32. Actual:  SwitchTest(null) ==="+ SwitchTest(null)  );
+  throw new Test262Error("#8: SwitchTest(null) === 32. Actual:  SwitchTest(null) ==="+ SwitchTest(null)  );
 }
 
 if(!(SwitchTest(void 0) === 32)){
-  $ERROR("#9: SwitchTest(void 0) === 32. Actual:  SwitchTest(void 0) ==="+ SwitchTest(void 0)  );
+  throw new Test262Error("#9: SwitchTest(void 0) === 32. Actual:  SwitchTest(void 0) ==="+ SwitchTest(void 0)  );
 }
 
 if(!(SwitchTest('0') === 32)){
-  $ERROR("#10: SwitchTest('0') === 32. Actual:  SwitchTest('0') ==="+ SwitchTest('0')  );
+  throw new Test262Error("#10: SwitchTest('0') === 32. Actual:  SwitchTest('0') ==="+ SwitchTest('0')  );
 }
 
 if(!(SwitchTest(x) === 128)){
-  $ERROR("#10: SwitchTest(x) === 128. Actual:  SwitchTest(x) ==="+ SwitchTest(x)  );
+  throw new Test262Error("#10: SwitchTest(x) === 128. Actual:  SwitchTest(x) ==="+ SwitchTest(x)  );
 }
diff --git a/test/language/statements/switch/S12.11_A1_T3.js b/test/language/statements/switch/S12.11_A1_T3.js
index 0a5c91ecc0..93bd169ecb 100644
--- a/test/language/statements/switch/S12.11_A1_T3.js
+++ b/test/language/statements/switch/S12.11_A1_T3.js
@@ -43,49 +43,49 @@ function SwitchTest(value){
 }
         
 if(!(SwitchTest(0) === 6)){
-  $ERROR("#1: SwitchTest(0) === 6. Actual:  SwitchTest(0) ==="+ SwitchTest(0)  );
+  throw new Test262Error("#1: SwitchTest(0) === 6. Actual:  SwitchTest(0) ==="+ SwitchTest(0)  );
 }
 
 if(!(SwitchTest(1) === 4)){
-  $ERROR("#2: SwitchTest(1) === 4. Actual:  SwitchTest(1) ==="+ SwitchTest(1)  );
+  throw new Test262Error("#2: SwitchTest(1) === 4. Actual:  SwitchTest(1) ==="+ SwitchTest(1)  );
 }
 
 if(!(SwitchTest(2) === 56)){
-  $ERROR("#3: SwitchTest(2) === 56. Actual:  SwitchTest(2) ==="+ SwitchTest(2)  );
+  throw new Test262Error("#3: SwitchTest(2) === 56. Actual:  SwitchTest(2) ==="+ SwitchTest(2)  );
 }
 
 if(!(SwitchTest(3) === 48)){
-  $ERROR("#4: SwitchTest(3) === 48. Actual:  SwitchTest(3) ==="+ SwitchTest(3)  );
+  throw new Test262Error("#4: SwitchTest(3) === 48. Actual:  SwitchTest(3) ==="+ SwitchTest(3)  );
 }
 
 if(!(SwitchTest(4) === 32)){
-  $ERROR("#5: SwitchTest(4) === 32. Actual:  SwitchTest(4) ==="+ SwitchTest(4)  );
+  throw new Test262Error("#5: SwitchTest(4) === 32. Actual:  SwitchTest(4) ==="+ SwitchTest(4)  );
 }
 
 if(!(SwitchTest(5) === 512)){
-  $ERROR("#5: SwitchTest(5) === 512. Actual:  SwitchTest(5) ==="+ SwitchTest(5)  );
+  throw new Test262Error("#5: SwitchTest(5) === 512. Actual:  SwitchTest(5) ==="+ SwitchTest(5)  );
 }
 
 if(!(SwitchTest(true) === 32)){
-  $ERROR("#6: SwitchTest(true) === 32. Actual:  SwitchTest(true) ==="+ SwitchTest(true)  );
+  throw new Test262Error("#6: SwitchTest(true) === 32. Actual:  SwitchTest(true) ==="+ SwitchTest(true)  );
 }
 
 if(!(SwitchTest(false) === 32)){
-  $ERROR("#7: SwitchTest(false) === 32. Actual:  SwitchTest(false) ==="+ SwitchTest(false)  );
+  throw new Test262Error("#7: SwitchTest(false) === 32. Actual:  SwitchTest(false) ==="+ SwitchTest(false)  );
 }
 
 if(!(SwitchTest(null) === 192)){
-  $ERROR("#8: SwitchTest(null) === 192. Actual:  SwitchTest(null) ==="+ SwitchTest(null)  );
+  throw new Test262Error("#8: SwitchTest(null) === 192. Actual:  SwitchTest(null) ==="+ SwitchTest(null)  );
 }
 
 if(!(SwitchTest(void 0) === 1024)){
-  $ERROR("#9: SwitchTest(void 0) === 1024. Actual:  SwitchTest(void 0) ==="+ SwitchTest(void 0)  );
+  throw new Test262Error("#9: SwitchTest(void 0) === 1024. Actual:  SwitchTest(void 0) ==="+ SwitchTest(void 0)  );
 }
 
 if(!(SwitchTest(NaN) === 32)){
-  $ERROR("#10: SwitchTest(NaN) === 32. Actual:  SwitchTest(NaN) ==="+ SwitchTest(NaN)  );
+  throw new Test262Error("#10: SwitchTest(NaN) === 32. Actual:  SwitchTest(NaN) ==="+ SwitchTest(NaN)  );
 }
 
 if(!(SwitchTest(Infinity) === 768)){
-  $ERROR("#10: SwitchTest(NaN) === 768. Actual:  SwitchTest(NaN) ==="+ SwitchTest(NaN)  );
+  throw new Test262Error("#10: SwitchTest(NaN) === 768. Actual:  SwitchTest(NaN) ==="+ SwitchTest(NaN)  );
 }
diff --git a/test/language/statements/switch/S12.11_A1_T4.js b/test/language/statements/switch/S12.11_A1_T4.js
index f575190982..5a0253c428 100644
--- a/test/language/statements/switch/S12.11_A1_T4.js
+++ b/test/language/statements/switch/S12.11_A1_T4.js
@@ -45,37 +45,37 @@ function SwitchTest(value){
 var n = Number(false);
 
 if(!(SwitchTest(n) === 6)){
-  $ERROR("#1: SwitchTest(Number(false)) === 6. Actual:  SwitchTest(Number(false)) ==="+ SwitchTest(n)  );
+  throw new Test262Error("#1: SwitchTest(Number(false)) === 6. Actual:  SwitchTest(Number(false)) ==="+ SwitchTest(n)  );
 }
 
 if(!(SwitchTest(parseInt) === 32)){
-  $ERROR("#2: SwitchTest(parseInt) === 32. Actual:  SwitchTest(parseInt) ==="+ SwitchTest(parseInt)  );
+  throw new Test262Error("#2: SwitchTest(parseInt) === 32. Actual:  SwitchTest(parseInt) ==="+ SwitchTest(parseInt)  );
 }
 
 if(!(SwitchTest(isNaN) === 128)){
-  $ERROR("#3: SwitchTest(isNaN) === 128. Actual:  SwitchTest(isNaN) ==="+ SwitchTest(isNaN)  );
+  throw new Test262Error("#3: SwitchTest(isNaN) === 128. Actual:  SwitchTest(isNaN) ==="+ SwitchTest(isNaN)  );
 }
 
 if(!(SwitchTest(true) === 32)){
-  $ERROR("#6: SwitchTest(true) === 32. Actual:  SwitchTest(true) ==="+ SwitchTest(true)  );
+  throw new Test262Error("#6: SwitchTest(true) === 32. Actual:  SwitchTest(true) ==="+ SwitchTest(true)  );
 }
 
 if(!(SwitchTest(false) === 48)){
-  $ERROR("#7: SwitchTest(false) === 48. Actual:  SwitchTest(false) ==="+ SwitchTest(false)  );
+  throw new Test262Error("#7: SwitchTest(false) === 48. Actual:  SwitchTest(false) ==="+ SwitchTest(false)  );
 }
 
 if(!(SwitchTest(null) === 192)){
-  $ERROR("#8: SwitchTest(null) === 192. Actual:  SwitchTest(null) ==="+ SwitchTest(null)  );
+  throw new Test262Error("#8: SwitchTest(null) === 192. Actual:  SwitchTest(null) ==="+ SwitchTest(null)  );
 }
 
 if(!(SwitchTest(void 0) === 1024)){
-  $ERROR("#9: SwitchTest(void 0) === 1024. Actual:  SwitchTest(void 0) ==="+ SwitchTest(void 0)  );
+  throw new Test262Error("#9: SwitchTest(void 0) === 1024. Actual:  SwitchTest(void 0) ==="+ SwitchTest(void 0)  );
 }
 
 if(!(SwitchTest(NaN) === 32)){
-  $ERROR("#10: SwitchTest(NaN) === 32. Actual:  SwitchTest(NaN) ==="+ SwitchTest(NaN)  );
+  throw new Test262Error("#10: SwitchTest(NaN) === 32. Actual:  SwitchTest(NaN) ==="+ SwitchTest(NaN)  );
 }
 
 if(!(SwitchTest(Infinity) === 768)){
-  $ERROR("#10: SwitchTest(NaN) === 768. Actual:  SwitchTest(NaN) ==="+ SwitchTest(NaN)  );
+  throw new Test262Error("#10: SwitchTest(NaN) === 768. Actual:  SwitchTest(NaN) ==="+ SwitchTest(NaN)  );
 }
diff --git a/test/language/statements/switch/S12.11_A4_T1.js b/test/language/statements/switch/S12.11_A4_T1.js
index cf81b50485..ed76d4f6cf 100644
--- a/test/language/statements/switch/S12.11_A4_T1.js
+++ b/test/language/statements/switch/S12.11_A4_T1.js
@@ -31,4 +31,4 @@ function SwitchTest(value){
 }
 
 var x = SwitchTest(0);
-if(x!==6) $ERROR("#1: SwitchTest(0) === 6. Actual:  SwitchTest(0) ==="+ SwitchTest(0)  );
+if(x!==6) throw new Test262Error("#1: SwitchTest(0) === 6. Actual:  SwitchTest(0) ==="+ SwitchTest(0)  );
diff --git a/test/language/statements/throw/S12.13_A2_T1.js b/test/language/statements/throw/S12.13_A2_T1.js
index 7a0b15efa5..dccfff71ea 100644
--- a/test/language/statements/throw/S12.13_A2_T1.js
+++ b/test/language/statements/throw/S12.13_A2_T1.js
@@ -14,5 +14,5 @@ try{
   throw undefined;
 }
 catch(e){
-  if (e!==undefined) $ERROR('#1: Exception === undefined. Actual:  Exception ==='+ e  );
+  if (e!==undefined) throw new Test262Error('#1: Exception === undefined. Actual:  Exception ==='+ e  );
 }
diff --git a/test/language/statements/throw/S12.13_A2_T2.js b/test/language/statements/throw/S12.13_A2_T2.js
index 5bad12f5e1..0bc5efaf1d 100644
--- a/test/language/statements/throw/S12.13_A2_T2.js
+++ b/test/language/statements/throw/S12.13_A2_T2.js
@@ -14,5 +14,5 @@ try{
   throw null;
 }
 catch(e){
-  if (e!==null) $ERROR('#1: Exception === null. Actual:  Exception ==='+ e  );
+  if (e!==null) throw new Test262Error('#1: Exception === null. Actual:  Exception ==='+ e  );
 }
diff --git a/test/language/statements/throw/S12.13_A2_T3.js b/test/language/statements/throw/S12.13_A2_T3.js
index 128f846c42..9a4097ccd0 100644
--- a/test/language/statements/throw/S12.13_A2_T3.js
+++ b/test/language/statements/throw/S12.13_A2_T3.js
@@ -14,7 +14,7 @@ try{
   throw true;
 }
 catch(e){
-  if (e!==true) $ERROR('#1: Exception ===true. Actual:  Exception ==='+ e  );
+  if (e!==true) throw new Test262Error('#1: Exception ===true. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#2
@@ -22,7 +22,7 @@ try{
   throw false;
 }
 catch(e){
-  if (e!==false) $ERROR('#2: Exception ===false. Actual:  Exception ==='+ e  );
+  if (e!==false) throw new Test262Error('#2: Exception ===false. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#3
@@ -31,7 +31,7 @@ try{
   throw b;
 }
 catch(e){
-  if (e!==false) $ERROR('#3: Exception ===false. Actual:  Exception ==='+ e  );
+  if (e!==false) throw new Test262Error('#3: Exception ===false. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#4
@@ -40,5 +40,5 @@ try{
   throw b;
 }
 catch(e){
-  if (e!==true) $ERROR('#4: Exception ===true. Actual:  Exception ==='+ e  );
+  if (e!==true) throw new Test262Error('#4: Exception ===true. Actual:  Exception ==='+ e  );
 }
diff --git a/test/language/statements/throw/S12.13_A2_T4.js b/test/language/statements/throw/S12.13_A2_T4.js
index cd9db88187..f34de93e24 100644
--- a/test/language/statements/throw/S12.13_A2_T4.js
+++ b/test/language/statements/throw/S12.13_A2_T4.js
@@ -14,7 +14,7 @@ try{
   throw "exception #1";
 }
 catch(e){
-  if (e!=="exception #1") $ERROR('#1: Exception ==="exception #1". Actual:  Exception ==='+ e );
+  if (e!=="exception #1") throw new Test262Error('#1: Exception ==="exception #1". Actual:  Exception ==='+ e );
 }
 
 // CHECK#2
@@ -23,5 +23,5 @@ try{
   throw b;
 }
 catch(e){
-  if (e!=="exception #1") $ERROR('#2: Exception ==="exception #1". Actual:  Exception ==='+ e );
+  if (e!=="exception #1") throw new Test262Error('#2: Exception ==="exception #1". Actual:  Exception ==='+ e );
 }
diff --git a/test/language/statements/throw/S12.13_A2_T5.js b/test/language/statements/throw/S12.13_A2_T5.js
index 799894e809..08f4c40ba5 100644
--- a/test/language/statements/throw/S12.13_A2_T5.js
+++ b/test/language/statements/throw/S12.13_A2_T5.js
@@ -14,7 +14,7 @@ try{
   throw 13;
 }
 catch(e){
-  if (e!==13) $ERROR('#1: Exception ===13. Actual:  Exception ==='+ e );
+  if (e!==13) throw new Test262Error('#1: Exception ===13. Actual:  Exception ==='+ e );
 }
 
 // CHECK#2
@@ -23,7 +23,7 @@ try{
   throw b;
 }
 catch(e){
-  if (e!==13) $ERROR('#2: Exception ===13. Actual:  Exception ==='+ e );
+  if (e!==13) throw new Test262Error('#2: Exception ===13. Actual:  Exception ==='+ e );
 }
 
 // CHECK#3
@@ -31,7 +31,7 @@ try{
   throw 2.13;
 }
 catch(e){
-  if (e!==2.13) $ERROR('#3: Exception ===2.13. Actual:  Exception ==='+ e );
+  if (e!==2.13) throw new Test262Error('#3: Exception ===2.13. Actual:  Exception ==='+ e );
 }
 
 // CHECK#4
@@ -47,7 +47,7 @@ try{
   throw +Infinity;
 }
 catch(e){
-  if (e!==+Infinity) $ERROR('#5: Exception ===+Infinity. Actual:  Exception ==='+ e );
+  if (e!==+Infinity) throw new Test262Error('#5: Exception ===+Infinity. Actual:  Exception ==='+ e );
 }
 
 // CHECK#6
@@ -55,7 +55,7 @@ try{
   throw -Infinity;
 }
 catch(e){
-  if (e!==-Infinity) $ERROR('#6: Exception ===-Infinity. Actual:  Exception ==='+ e );
+  if (e!==-Infinity) throw new Test262Error('#6: Exception ===-Infinity. Actual:  Exception ==='+ e );
 }
 
 // CHECK#7
@@ -63,7 +63,7 @@ try{
   throw +0;
 }
 catch(e){
-  if (e!==+0) $ERROR('#7: Exception ===+0. Actual:  Exception ==='+ e );
+  if (e!==+0) throw new Test262Error('#7: Exception ===+0. Actual:  Exception ==='+ e );
 }
 
 // CHECK#8
@@ -71,5 +71,5 @@ try{
   throw -0;
 }
 catch(e){
-  if (e!==-0) $ERROR('#8: Exception ===-0. Actual:  Exception ==='+ e );
+  if (e!==-0) throw new Test262Error('#8: Exception ===-0. Actual:  Exception ==='+ e );
 }
diff --git a/test/language/statements/throw/S12.13_A2_T6.js b/test/language/statements/throw/S12.13_A2_T6.js
index cfb05144b0..1838fd7514 100644
--- a/test/language/statements/throw/S12.13_A2_T6.js
+++ b/test/language/statements/throw/S12.13_A2_T6.js
@@ -29,11 +29,11 @@ try{
 }
 catch(e){	
 // CHECK#1
-  if (e.p1!=="a") $ERROR('#1: e.p1 === "a". Actual:  e.p1 ==='+ e.p1  );
+  if (e.p1!=="a") throw new Test262Error('#1: e.p1 === "a". Actual:  e.p1 ==='+ e.p1  );
 // CHECK#2
-  if (e.value!=='myObj_value') $ERROR('#2: e.p1 === \'myObj_value\'. Actual:  e.p1 ==='+ e.p1  );
+  if (e.value!=='myObj_value') throw new Test262Error('#2: e.p1 === \'myObj_value\'. Actual:  e.p1 ==='+ e.p1  );
 // CHECK#3
-  if (e.eval()!=='obj_eval') $ERROR('#3: e.p1 === \'obj_eval\'. Actual:  e.p1 ==='+ e.p1  );
+  if (e.eval()!=='obj_eval') throw new Test262Error('#3: e.p1 === \'obj_eval\'. Actual:  e.p1 ==='+ e.p1  );
 }
 
 // CHECK#4
@@ -42,4 +42,4 @@ try{
   throw myObj;
 }
 catch(e){}
-if (myObj.i!==6) $ERROR('#4: Handling of catch must be correct');
+if (myObj.i!==6) throw new Test262Error('#4: Handling of catch must be correct');
diff --git a/test/language/statements/throw/S12.13_A2_T7.js b/test/language/statements/throw/S12.13_A2_T7.js
index ef10df3322..43eaac4a0b 100644
--- a/test/language/statements/throw/S12.13_A2_T7.js
+++ b/test/language/statements/throw/S12.13_A2_T7.js
@@ -25,6 +25,6 @@ try{
 }
 catch(e){
   for (var i=0;i<3;i++){
-    if (e[i]!==mycars[i]) $ERROR('#1.'+i+': Exception['+i+'] === mycars['+i+']. Actual:  Exception['+i+'] ==='+ e[i]  );
+    if (e[i]!==mycars[i]) throw new Test262Error('#1.'+i+': Exception['+i+'] === mycars['+i+']. Actual:  Exception['+i+'] ==='+ e[i]  );
   }
 }
diff --git a/test/language/statements/throw/S12.13_A3_T1.js b/test/language/statements/throw/S12.13_A3_T1.js
index 1485ba8fb4..4a383f3f16 100644
--- a/test/language/statements/throw/S12.13_A3_T1.js
+++ b/test/language/statements/throw/S12.13_A3_T1.js
@@ -13,7 +13,7 @@ try{
   throw b&&false;
 }
 catch(e){
-  if (e!==false) $ERROR('#1: Exception === false(operaton &&). Actual:  Exception ==='+ e );
+  if (e!==false) throw new Test262Error('#1: Exception === false(operaton &&). Actual:  Exception ==='+ e );
 }
 
 // CHECK#2
@@ -22,7 +22,7 @@ try{
   throw b||false;
 }
 catch(e){
-  if (e!==true) $ERROR('#2: Exception === true(operaton ||). Actual:  Exception ==='+ e );
+  if (e!==true) throw new Test262Error('#2: Exception === true(operaton ||). Actual:  Exception ==='+ e );
 }
 
 // CHECK#3
@@ -30,7 +30,7 @@ try{
   throw !false;
 }
 catch(e){
-  if (e!==true) $ERROR('#3: Exception === true(operaton !). Actual:  Exception ==='+ e );
+  if (e!==true) throw new Test262Error('#3: Exception === true(operaton !). Actual:  Exception ==='+ e );
 }
 
 // CHECK#4
@@ -39,5 +39,5 @@ try{
   throw !(b&&false);
 }
 catch(e){
-  if (e!==true) $ERROR('#4: Exception === true(operaton &&). Actual:  Exception ==='+ e );
+  if (e!==true) throw new Test262Error('#4: Exception === true(operaton &&). Actual:  Exception ==='+ e );
 }
diff --git a/test/language/statements/throw/S12.13_A3_T2.js b/test/language/statements/throw/S12.13_A3_T2.js
index 977b235638..91ded2b66b 100644
--- a/test/language/statements/throw/S12.13_A3_T2.js
+++ b/test/language/statements/throw/S12.13_A3_T2.js
@@ -12,7 +12,7 @@ try{
   throw "exception"+" #1";
 }
 catch(e){
-  if (e!=="exception #1") $ERROR('#1: Exception === "exception #1"(operaton +). Actual:  Exception ==='+ e );
+  if (e!=="exception #1") throw new Test262Error('#1: Exception === "exception #1"(operaton +). Actual:  Exception ==='+ e );
 }
 
 // CHECK#2
@@ -22,5 +22,5 @@ try{
   throw b+a;
 }
 catch(e){
-  if (e!=="exception #1") $ERROR('#2: Exception === "exception #1"(operaton +). Actual:  Exception ==='+ e );
+  if (e!=="exception #1") throw new Test262Error('#2: Exception === "exception #1"(operaton +). Actual:  Exception ==='+ e );
 }
diff --git a/test/language/statements/throw/S12.13_A3_T3.js b/test/language/statements/throw/S12.13_A3_T3.js
index 3821e7b3d4..c71d03ee7a 100644
--- a/test/language/statements/throw/S12.13_A3_T3.js
+++ b/test/language/statements/throw/S12.13_A3_T3.js
@@ -12,7 +12,7 @@ try{
   throw 10+3;
 }
 catch(e){
-  if (e!==13) $ERROR('#1: Exception ===13(operaton +). Actual:  Exception ==='+ e);
+  if (e!==13) throw new Test262Error('#1: Exception ===13(operaton +). Actual:  Exception ==='+ e);
 }
 
 // CHECK#2
@@ -22,7 +22,7 @@ try{
   throw a+b;
 }
 catch(e){
-  if (e!==13) $ERROR('#2: Exception ===13(operaton +). Actual:  Exception ==='+ e);
+  if (e!==13) throw new Test262Error('#2: Exception ===13(operaton +). Actual:  Exception ==='+ e);
 }
 
 // CHECK#3
@@ -30,7 +30,7 @@ try{
   throw 3.15-1.02;
 }
 catch(e){
-  if (e!==2.13) $ERROR('#3: Exception ===2.13(operaton -). Actual:  Exception ==='+ e);
+  if (e!==2.13) throw new Test262Error('#3: Exception ===2.13(operaton -). Actual:  Exception ==='+ e);
 }
 
 // CHECK#4
@@ -38,7 +38,7 @@ try{
   throw 2*2;
 }
 catch(e){
-  if (e!==4) $ERROR('#4: Exception ===4(operaton *). Actual:  Exception ==='+ e);
+  if (e!==4) throw new Test262Error('#4: Exception ===4(operaton *). Actual:  Exception ==='+ e);
 }
 
 // CHECK#5
@@ -46,7 +46,7 @@ try{
   throw 1+Infinity;
 }
 catch(e){
-  if (e!==+Infinity) $ERROR('#5: Exception ===+Infinity(operaton +). Actual:  Exception ==='+ e);
+  if (e!==+Infinity) throw new Test262Error('#5: Exception ===+Infinity(operaton +). Actual:  Exception ==='+ e);
 }
 
 // CHECK#6
@@ -54,7 +54,7 @@ try{
   throw 1-Infinity;
 }
 catch(e){
-  if (e!==-Infinity) $ERROR('#6: Exception ===-Infinity(operaton -). Actual:  Exception ==='+ e);
+  if (e!==-Infinity) throw new Test262Error('#6: Exception ===-Infinity(operaton -). Actual:  Exception ==='+ e);
 }
 
 // CHECK#7
@@ -62,7 +62,7 @@ try{
   throw 10/5;
 }
 catch(e){
-  if (e!==2) $ERROR('#7: Exception ===2(operaton /). Actual:  Exception ==='+ e);
+  if (e!==2) throw new Test262Error('#7: Exception ===2(operaton /). Actual:  Exception ==='+ e);
 }
 
 // CHECK#8
@@ -70,7 +70,7 @@ try{
   throw 8>>2;
 }
 catch(e){
-  if (e!==2) $ERROR('#8: Exception ===2(operaton >>). Actual:  Exception ==='+ e);
+  if (e!==2) throw new Test262Error('#8: Exception ===2(operaton >>). Actual:  Exception ==='+ e);
 }
 
 // CHECK#9
@@ -78,7 +78,7 @@ try{
   throw 2<<2;
 }
 catch(e){
-  if (e!==8) $ERROR('#9: Exception ===8(operaton <<). Actual:  Exception ==='+ e);
+  if (e!==8) throw new Test262Error('#9: Exception ===8(operaton <<). Actual:  Exception ==='+ e);
 }
 
 // CHECK#10
@@ -86,5 +86,5 @@ try{
   throw 123%100;
 }
 catch(e){
-  if (e!==23) $ERROR('#10: Exception ===23(operaton %). Actual:  Exception ==='+ e);
+  if (e!==23) throw new Test262Error('#10: Exception ===23(operaton %). Actual:  Exception ==='+ e);
 }
diff --git a/test/language/statements/throw/S12.13_A3_T4.js b/test/language/statements/throw/S12.13_A3_T4.js
index 9bd7947cb6..e5297e936b 100644
--- a/test/language/statements/throw/S12.13_A3_T4.js
+++ b/test/language/statements/throw/S12.13_A3_T4.js
@@ -23,10 +23,10 @@ try{
 }
 catch(e){
   for (var i=0;i<3;i++){
-    if (e[i]!==mycars[i]) $ERROR('#1.'+i+': Exception['+i+']===mycars['+i+'](operation .concat). Actual:  Exception['+i+']==='+ e[i] );
+    if (e[i]!==mycars[i]) throw new Test262Error('#1.'+i+': Exception['+i+']===mycars['+i+'](operation .concat). Actual:  Exception['+i+']==='+ e[i] );
   }
   for (var i=3;i<6;i++){
-    if (e[i]!==mycars2[i-3]) $ERROR('#1.'+i+': Exception['+i+']===mycars2['+(i-3)+'](operation .concat). Actual:  Exception['+i+']==='+ e[i] );
+    if (e[i]!==mycars2[i-3]) throw new Test262Error('#1.'+i+': Exception['+i+']===mycars2['+(i-3)+'](operation .concat). Actual:  Exception['+i+']==='+ e[i] );
   }
 }
 
@@ -36,7 +36,7 @@ try{
 }
 catch(e){
   for (var i=0;i<3;i++){
-    if (e[i]!==mycars2[i]) $ERROR('#2.'+i+': Exception['+i+']===mycars2['+i+'](operation new). Actual:  Exception['+i+']==='+ e[i] );
+    if (e[i]!==mycars2[i]) throw new Test262Error('#2.'+i+': Exception['+i+']===mycars2['+i+'](operation new). Actual:  Exception['+i+']==='+ e[i] );
   }
 }
 
@@ -46,9 +46,9 @@ try{
 }
 catch(e){
   for (var i=0;i<3;i++){
-    if (e[i]!==mycars[i]) $ERROR('#3.'+i+': Exception['+i+']===mycars['+i+'](operation .concat(new)). Actual:  Exception['+i+']==='+ e[i] );
+    if (e[i]!==mycars[i]) throw new Test262Error('#3.'+i+': Exception['+i+']===mycars['+i+'](operation .concat(new)). Actual:  Exception['+i+']==='+ e[i] );
   }
   for (var i=3;i<6;i++){
-    if (e[i]!==mycars2[i-3]) $ERROR('#3.'+i+': Exception['+i+']===mycars2['+(i-3)+'](operation .concat(new)). Actual:  Exception['+i+']==='+ e[i] );
+    if (e[i]!==mycars2[i-3]) throw new Test262Error('#3.'+i+': Exception['+i+']===mycars2['+(i-3)+'](operation .concat(new)). Actual:  Exception['+i+']==='+ e[i] );
   }
 }
diff --git a/test/language/statements/throw/S12.13_A3_T5.js b/test/language/statements/throw/S12.13_A3_T5.js
index d67f01bc64..f1cd7ac726 100644
--- a/test/language/statements/throw/S12.13_A3_T5.js
+++ b/test/language/statements/throw/S12.13_A3_T5.js
@@ -14,5 +14,5 @@ try{
   throw ((a&&(!b))?"exception":" #1");
 }
 catch(e){
-  if (e!=="exception") $ERROR('#1: Exception ==="exception"(operaton ? , ). Actual:  Exception ==='+e  );
+  if (e!=="exception") throw new Test262Error('#1: Exception ==="exception"(operaton ? , ). Actual:  Exception ==='+e  );
 }
diff --git a/test/language/statements/throw/S12.13_A3_T6.js b/test/language/statements/throw/S12.13_A3_T6.js
index 23e27685ed..523e1c1f53 100644
--- a/test/language/statements/throw/S12.13_A3_T6.js
+++ b/test/language/statements/throw/S12.13_A3_T6.js
@@ -17,7 +17,7 @@ try{
   throw (adding1());
 }
 catch(e){
-  if (e!==1) $ERROR('#1: Exception ===1. Actual:  Exception ==='+ e);
+  if (e!==1) throw new Test262Error('#1: Exception ===1. Actual:  Exception ==='+ e);
 }
 
 // CHECK#2
@@ -30,7 +30,7 @@ try{
   throw adding2();
 }
 catch(e){}
-if (i!==1) $ERROR('#2: i===1. Actual: i==='+ i);
+if (i!==1) throw new Test262Error('#2: i===1. Actual: i==='+ i);
 
 // CHECK#3
 var i=0;
@@ -41,7 +41,7 @@ try{
   throw adding3();
 }
 catch(e){}
-if (i!==1) $ERROR('#3: i===1. Actual: i==='+i);
+if (i!==1) throw new Test262Error('#3: i===1. Actual: i==='+i);
 
 // CHECK#4
 function adding4(i){
@@ -52,5 +52,5 @@ try{
   throw (adding4(1));
 }
 catch(e){
-  if (e!==2) $ERROR('#4: Exception ===2. Actual:  Exception ==='+ e);
+  if (e!==2) throw new Test262Error('#4: Exception ===2. Actual:  Exception ==='+ e);
 }
diff --git a/test/language/statements/try/S12.14_A1.js b/test/language/statements/try/S12.14_A1.js
index cc2f58ca45..a588aff041 100644
--- a/test/language/statements/try/S12.14_A1.js
+++ b/test/language/statements/try/S12.14_A1.js
@@ -16,7 +16,7 @@ try {
   var x=0;
 }
 catch (e) {
-  $ERROR('#1: If Result(1).type is not throw, return Result(1). Actual: 4 Return(Result(3))');
+  throw new Test262Error('#1: If Result(1).type is not throw, return Result(1). Actual: 4 Return(Result(3))');
 }
 
 // CHECK#2
@@ -29,10 +29,10 @@ finally
   c1=1;
 }
 if(x1!==1){
-  $ERROR('#2.1: "try" block must be evaluated. Actual: try Block has not been evaluated');
+  throw new Test262Error('#2.1: "try" block must be evaluated. Actual: try Block has not been evaluated');
 }
 if (c1!==1){
-  $ERROR('#2.2: "finally" block must be evaluated. Actual: finally Block has not been evaluated');
+  throw new Test262Error('#2.2: "finally" block must be evaluated. Actual: finally Block has not been evaluated');
 }
 
 // CHECK#3
@@ -41,14 +41,14 @@ try{
   var x2=1;
 }
 catch(e){
-  $ERROR('#3.1: If Result(1).type is not throw, return Result(1). Actual: 4 Return(Result(3))');	
+  throw new Test262Error('#3.1: If Result(1).type is not throw, return Result(1). Actual: 4 Return(Result(3))');	
 }
 finally{
   c2=1;
 }
 if(x2!==1){
-  $ERROR('#3.2: "try" block must be evaluated. Actual: try Block has not been evaluated');
+  throw new Test262Error('#3.2: "try" block must be evaluated. Actual: try Block has not been evaluated');
 }
 if (c2!==1){
-  $ERROR('#3.3: "finally" block must be evaluated. Actual: finally Block has not been evaluated');
+  throw new Test262Error('#3.3: "finally" block must be evaluated. Actual: finally Block has not been evaluated');
 }
diff --git a/test/language/statements/try/S12.14_A10_T1.js b/test/language/statements/try/S12.14_A10_T1.js
index 4bbb7b8a98..3727e9b752 100644
--- a/test/language/statements/try/S12.14_A10_T1.js
+++ b/test/language/statements/try/S12.14_A10_T1.js
@@ -20,5 +20,5 @@ while(i<10){
 }
 }
 catch(e){
-  if(e!==5)$ERROR('#1: Exception === 5. Actual:  Exception ==='+ e  );
+  if(e!==5)throw new Test262Error('#1: Exception === 5. Actual:  Exception ==='+ e  );
 }
diff --git a/test/language/statements/try/S12.14_A10_T2.js b/test/language/statements/try/S12.14_A10_T2.js
index 18ef3a179e..3e310ab049 100644
--- a/test/language/statements/try/S12.14_A10_T2.js
+++ b/test/language/statements/try/S12.14_A10_T2.js
@@ -23,7 +23,7 @@ while(c1<2){
   fin=-1;
 };
 if(fin!==1){
-  $ERROR('#1: "finally" block must be evaluated at "try{continue} catch finally" construction');
+  throw new Test262Error('#1: "finally" block must be evaluated at "try{continue} catch finally" construction');
 }
 
 // CHECK#2
@@ -42,7 +42,7 @@ while(c2<2){
   fin2=-1;
 }
 if(fin2!==1){
-  $ERROR('#2: "finally" block must be evaluated at "try catch{continue} finally" construction');
+  throw new Test262Error('#2: "finally" block must be evaluated at "try catch{continue} finally" construction');
 }
 
 // CHECK#3
@@ -61,7 +61,7 @@ while(c3<2){
   fin3=0;
 }
 if(fin3!==1){
-  $ERROR('#3: "finally" block must be evaluated at "try catch finally{continue}" construction');
+  throw new Test262Error('#3: "finally" block must be evaluated at "try catch finally{continue}" construction');
 }
 
 // CHECK#4
@@ -77,7 +77,7 @@ while(c4<2){
   fin4=-1;
 };
 if(fin4!==1){
-  $ERROR('#4: "finally" block must be evaluated at "try{continue} finally" construction');
+  throw new Test262Error('#4: "finally" block must be evaluated at "try{continue} finally" construction');
 }
 
 // CHECK#5
@@ -92,7 +92,7 @@ while(c5<2){
   }
 }
 if(c5!==2){
-  $ERROR('#5: "try catch{continue}" must work correctly');
+  throw new Test262Error('#5: "try catch{continue}" must work correctly');
 }
 
 // CHECK#6
@@ -109,8 +109,8 @@ while(c6<2){
   fin6=-1;
 }
 if(fin6!==1){
-  $ERROR('#6.1: "finally" block must be evaluated');
+  throw new Test262Error('#6.1: "finally" block must be evaluated');
 }
 if(c6!==2){
-  $ERROR('#6.2: "try finally{continue}" must work correctly');
+  throw new Test262Error('#6.2: "try finally{continue}" must work correctly');
 }
diff --git a/test/language/statements/try/S12.14_A10_T3.js b/test/language/statements/try/S12.14_A10_T3.js
index 6389407010..2243b24b7e 100644
--- a/test/language/statements/try/S12.14_A10_T3.js
+++ b/test/language/statements/try/S12.14_A10_T3.js
@@ -24,10 +24,10 @@ while(c1<2){
   c1+=2;
 }
 if(fin!==1){
-  $ERROR('#1.1: "finally" block must be evaluated');
+  throw new Test262Error('#1.1: "finally" block must be evaluated');
 }
 if(c1!==1){
-  $ERROR('#1.2: "try{break}catch finally" must work correctly');
+  throw new Test262Error('#1.2: "try{break}catch finally" must work correctly');
 }
 
 // CHECK#2
@@ -47,10 +47,10 @@ while(c2<2){
   fin2=-1;
 }
 if(fin2!==1){
-  $ERROR('#2.1: "finally" block must be evaluated');
+  throw new Test262Error('#2.1: "finally" block must be evaluated');
 }
 if(c2!==1){
-  $ERROR('#2.2: "try catch{break} finally" must work correctly');
+  throw new Test262Error('#2.2: "try catch{break} finally" must work correctly');
 }
 
 // CHECK#3
@@ -70,10 +70,10 @@ while(c3<2){
   fin3=0;
 }
 if(fin3!==1){
-  $ERROR('#3.1: "finally" block must be evaluated');
+  throw new Test262Error('#3.1: "finally" block must be evaluated');
 }
 if(c3!==1){
-  $ERROR('#3.2: "try catch finally{break}" must work correctly');
+  throw new Test262Error('#3.2: "try catch finally{break}" must work correctly');
 }
 
 // CHECK#4
@@ -90,10 +90,10 @@ while(c4<2){
   c4+=2;
 }
 if(fin4!==1){
-  $ERROR('#4.1: "finally" block must be evaluated');
+  throw new Test262Error('#4.1: "finally" block must be evaluated');
 }
 if(c4!==1){
-  $ERROR('#4.2: "try{break} finally" must work correctly');
+  throw new Test262Error('#4.2: "try{break} finally" must work correctly');
 }
 
 // CHECK#5
@@ -107,7 +107,7 @@ while(c5<2){
   }
 }
 if(c5!==0){
-  $ERROR('#5: "try catch{break}" must work correctly');
+  throw new Test262Error('#5: "try catch{break}" must work correctly');
 }
 
 // CHECK#6
@@ -121,7 +121,7 @@ while(c6<2){
   c6+=2;
 }
 if(c6!==1){
-  $ERROR('#6: "try{break} catch" must work correctly');
+  throw new Test262Error('#6: "try{break} catch" must work correctly');
 }
 
 // CHECK#7
@@ -144,8 +144,8 @@ catch(ex1){
   c7=10;
 }
 if(fin7!==1){
-  $ERROR('#7.1: "finally" block must be evaluated');
+  throw new Test262Error('#7.1: "finally" block must be evaluated');
 }
 if(c7!==1){
-  $ERROR('#7.2: "try finally{break}" must work correctly');
+  throw new Test262Error('#7.2: "try finally{break}" must work correctly');
 }
diff --git a/test/language/statements/try/S12.14_A10_T4.js b/test/language/statements/try/S12.14_A10_T4.js
index c01f44a322..ab33875816 100644
--- a/test/language/statements/try/S12.14_A10_T4.js
+++ b/test/language/statements/try/S12.14_A10_T4.js
@@ -25,10 +25,10 @@ while(c1<2){
   c1+=2;
 }
 if(fin!==1){
-  $ERROR('#1.1: "finally" block must be evaluated');
+  throw new Test262Error('#1.1: "finally" block must be evaluated');
 }
 if(c1!==2){
-  $ERROR('#1.2: "try{break} catch finally{continue}" must work correctly');
+  throw new Test262Error('#1.2: "try{break} catch finally{continue}" must work correctly');
 }
 
 // CHECK#2
@@ -49,8 +49,8 @@ while(c2<2){
   fin2=-1;
 }
 if(fin2!==1){
-  $ERROR('#2.1: "finally" block must be evaluated');
+  throw new Test262Error('#2.1: "finally" block must be evaluated');
 }
 if(c2!==2){
-  $ERROR('#2.2: "try catch{break} finally{continue} must work correctly');
+  throw new Test262Error('#2.2: "try catch{break} finally{continue} must work correctly');
 }
diff --git a/test/language/statements/try/S12.14_A10_T5.js b/test/language/statements/try/S12.14_A10_T5.js
index a40c6519ad..125fe7fc62 100644
--- a/test/language/statements/try/S12.14_A10_T5.js
+++ b/test/language/statements/try/S12.14_A10_T5.js
@@ -17,23 +17,23 @@ while(i<10){
   try{
     if(c===0){
       throw "ex1";
-      $ERROR('#1.1: throw "ex1" lead to throwing exception');
+      throw new Test262Error('#1.1: throw "ex1" lead to throwing exception');
     }
     c+=2;
     if(c===1){
       throw "ex2";
-      $ERROR('#1.2: throw "ex2" lead to throwing exception');
+      throw new Test262Error('#1.2: throw "ex2" lead to throwing exception');
     }
   }
   catch(er1){
     c-=1;
     continue;
-    $ERROR('#1.3: "try catch{continue} finally" must work correctly');
+    throw new Test262Error('#1.3: "try catch{continue} finally" must work correctly');
   }
   finally{
     fin+=1;
   }
 }
 if(fin!==10){
-  $ERROR('#1.4: "finally" block must be evaluated');
+  throw new Test262Error('#1.4: "finally" block must be evaluated');
 }
diff --git a/test/language/statements/try/S12.14_A11_T1.js b/test/language/statements/try/S12.14_A11_T1.js
index 6d4a294337..f0e37ff0ad 100644
--- a/test/language/statements/try/S12.14_A11_T1.js
+++ b/test/language/statements/try/S12.14_A11_T1.js
@@ -16,5 +16,5 @@ try{
   }
 }
 catch(e){
-  if(e!==5)$ERROR('#1: Exception === 5. Actual:  Exception ==='+ e  );
+  if(e!==5)throw new Test262Error('#1: Exception === 5. Actual:  Exception ==='+ e  );
 }
diff --git a/test/language/statements/try/S12.14_A11_T2.js b/test/language/statements/try/S12.14_A11_T2.js
index 249e4d5f55..dd6ec0ab91 100644
--- a/test/language/statements/try/S12.14_A11_T2.js
+++ b/test/language/statements/try/S12.14_A11_T2.js
@@ -23,7 +23,7 @@ for(var i=0;i<5;i++){
   fin=-1;
 }
 if(fin!==1){
-  $ERROR('#1: "finally" block must be evaluated at "try{continue} catch finally" construction');
+  throw new Test262Error('#1: "finally" block must be evaluated at "try{continue} catch finally" construction');
 }
 
 // CHECK#2
@@ -42,10 +42,10 @@ for(var i=0;i<5;i++){
   fin2=-1;
 }
 if(fin2!==1){
-  $ERROR('#2.1: "finally" block must be evaluated');
+  throw new Test262Error('#2.1: "finally" block must be evaluated');
 }
 if(c2!==5){
-  $ERROR('#2.1: "try catch{continue} finally" must work correctly');
+  throw new Test262Error('#2.1: "try catch{continue} finally" must work correctly');
 }
 
 // CHECK#3
@@ -64,10 +64,10 @@ for(var i=0;i<5;i++){
   fin3=0;
 }
 if(fin3!==1){
-  $ERROR('#3.1: "finally" block must be evaluated');
+  throw new Test262Error('#3.1: "finally" block must be evaluated');
 }
 if(c3!==5){
-  $ERROR('#3.2: "try catch finally{continue}" must work correctly');
+  throw new Test262Error('#3.2: "try catch finally{continue}" must work correctly');
 }
 
 // CHECK#4
@@ -83,7 +83,7 @@ for(var i=0;i<5;i++){
   fin=-1;
 };
 if(fin!==1){
-  $ERROR('#4: "finally" block must be evaluated at "try{continue} finally" construction');
+  throw new Test262Error('#4: "finally" block must be evaluated at "try{continue} finally" construction');
 }
 
 // CHECK#5
@@ -99,7 +99,7 @@ for(var c5=0;c5<10;){
   c5+=12;
 };
 if(c5!==10){
-  $ERROR('#5: "try catch{continue} must work correctly');
+  throw new Test262Error('#5: "try catch{continue} must work correctly');
 }
 
 // CHECK#6
@@ -116,8 +116,8 @@ for(var c6=0;c6<10;){
   fin6=-1;
 };
 if(fin6!==1){
-  $ERROR('#6.1: "finally" block must be evaluated');
+  throw new Test262Error('#6.1: "finally" block must be evaluated');
 }
 if(c6!==10){
-  $ERROR('#6.2: "try finally{continue}" must work correctly');
+  throw new Test262Error('#6.2: "try finally{continue}" must work correctly');
 }
diff --git a/test/language/statements/try/S12.14_A11_T3.js b/test/language/statements/try/S12.14_A11_T3.js
index 1caa49b625..fe9e6ec10e 100644
--- a/test/language/statements/try/S12.14_A11_T3.js
+++ b/test/language/statements/try/S12.14_A11_T3.js
@@ -24,10 +24,10 @@ for(var i=0;i<5;i++){
   c1+=2;
 };
 if(fin!==1){
-  $ERROR('#1.1: "finally" block must be evaluated');
+  throw new Test262Error('#1.1: "finally" block must be evaluated');
 }
 if(c1!==1){
-  $ERROR('#1.2: "try{break}catch finally" must work correctly');
+  throw new Test262Error('#1.2: "try{break}catch finally" must work correctly');
 }
 
 // CHECK#2
@@ -47,10 +47,10 @@ for(var i=0;i<5;i++){
   fin2=-1;
 };
 if(fin2!==1){
-  $ERROR('#2.1: "finally" block must be evaluated');
+  throw new Test262Error('#2.1: "finally" block must be evaluated');
 }
 if(c2!==1){
-  $ERROR('#2.2: "try catch{break} finally" must work correctly');
+  throw new Test262Error('#2.2: "try catch{break} finally" must work correctly');
 }
 
 // CHECK#3
@@ -70,10 +70,10 @@ for(var i=0;i<5;i++){
   fin3=0;
 };
 if(fin3!==1){
-  $ERROR('#3.1: "finally" block must be evaluated');
+  throw new Test262Error('#3.1: "finally" block must be evaluated');
 }
 if(c3!==1){
-  $ERROR('#3.2: "try catch finally{break}" must work correctly');
+  throw new Test262Error('#3.2: "try catch finally{break}" must work correctly');
 }
 
 // CHECK#4
@@ -90,10 +90,10 @@ for(var i=0;i<5;i++){
   c4+=2;
 };
 if(fin4!==1){
-  $ERROR('#4.1: "finally" block must be evaluated');
+  throw new Test262Error('#4.1: "finally" block must be evaluated');
 }
 if(c4!==1){
-  $ERROR('#4.2: "try{break} finally" must work correctly');
+  throw new Test262Error('#4.2: "try{break} finally" must work correctly');
 }
 
 // CHECK#5
@@ -106,7 +106,7 @@ for(var i=0;i<5;i++){
   }
 };
 if(i!==0){
-  $ERROR('#5: "try catch{break}" must work correctly');
+  throw new Test262Error('#5: "try catch{break}" must work correctly');
 }
 
 // CHECK#6
@@ -120,7 +120,7 @@ for(var c6=0;c6<5;){
   c6+=2;
 };
 if(c6!==1){
-  $ERROR('#6: "try{break} catch" must work correctly');
+  throw new Test262Error('#6: "try{break} catch" must work correctly');
 }
 
 // CHECK#7
@@ -143,8 +143,8 @@ catch(ex1){
   c7=10;
 }
 if(fin7!==1){
-  $ERROR('#7.1: "finally" block must be evaluated');
+  throw new Test262Error('#7.1: "finally" block must be evaluated');
 }
 if(c7!==1){
-  $ERROR('#7.2: "try finally{break}" must work correctly');
+  throw new Test262Error('#7.2: "try finally{break}" must work correctly');
 }
diff --git a/test/language/statements/try/S12.14_A11_T4.js b/test/language/statements/try/S12.14_A11_T4.js
index a6f7e49fc2..4ea72f7852 100644
--- a/test/language/statements/try/S12.14_A11_T4.js
+++ b/test/language/statements/try/S12.14_A11_T4.js
@@ -25,10 +25,10 @@ for(var i=0;i<5;i++){
   c1+=2;
 }
 if(fin!==1){
-  $ERROR('#1.1: "finally" block must be evaluated');
+  throw new Test262Error('#1.1: "finally" block must be evaluated');
 }
 if(c1!==5){
-  $ERROR('#1.2: "try{break} catch finally{continue}" must work correctly');
+  throw new Test262Error('#1.2: "try{break} catch finally{continue}" must work correctly');
 }
 
 // CHECK#2
@@ -49,8 +49,8 @@ for(var i=0;i<5;i++){
   fin2=-1;
 }
 if(fin2!==1){
-  $ERROR('#2.1: "finally" block must be evaluated');
+  throw new Test262Error('#2.1: "finally" block must be evaluated');
 }
 if(c2!==5){
-  $ERROR('#2.2: "try catch{break} finally{continue}" must work correctly');
+  throw new Test262Error('#2.2: "try catch{break} finally{continue}" must work correctly');
 }
diff --git a/test/language/statements/try/S12.14_A12_T1.js b/test/language/statements/try/S12.14_A12_T1.js
index f6a524177f..410766f3bf 100644
--- a/test/language/statements/try/S12.14_A12_T1.js
+++ b/test/language/statements/try/S12.14_A12_T1.js
@@ -22,5 +22,5 @@ try{
   }
 }
 catch(e){
-  if(e!=="ex")$ERROR('#1: Exception ==="ex". Actual:  Exception ==='+ e  );
+  if(e!=="ex")throw new Test262Error('#1: Exception ==="ex". Actual:  Exception ==='+ e  );
 }
diff --git a/test/language/statements/try/S12.14_A12_T2.js b/test/language/statements/try/S12.14_A12_T2.js
index 55cef865d4..bbb6f30f89 100644
--- a/test/language/statements/try/S12.14_A12_T2.js
+++ b/test/language/statements/try/S12.14_A12_T2.js
@@ -30,10 +30,10 @@ for (x in mycars){
   fin=-1;
 }
 if(fin!==1){
-  $ERROR('#1.1: "finally" block must be evaluated');
+  throw new Test262Error('#1.1: "finally" block must be evaluated');
 }
 if(i!==3){
-  $ERROR('#1.2:  "try{continue} catch finally" must work correctly');
+  throw new Test262Error('#1.2:  "try{continue} catch finally" must work correctly');
 }
 
 // CHECK#2
@@ -52,10 +52,10 @@ for (x in mycars){
   fin2=-1;
 }
 if(fin2!==1){
-  $ERROR('#2.1: "finally" block must be evaluated');
+  throw new Test262Error('#2.1: "finally" block must be evaluated');
 }
 if(c2!==3){
-  $ERROR('#2.1: "try catch{continue} finally" must work correctly');
+  throw new Test262Error('#2.1: "try catch{continue} finally" must work correctly');
 }
 
 // CHECK#3
@@ -74,10 +74,10 @@ for (x in mycars){
   fin3=0;
 }
 if(c3!==3){
-  $ERROR('#3.1: "finally" block must be evaluated');
+  throw new Test262Error('#3.1: "finally" block must be evaluated');
 }
 if(fin3!==1){
-  $ERROR('#3.2: "try catch finally{continue}" must work correctly');
+  throw new Test262Error('#3.2: "try catch finally{continue}" must work correctly');
 }
 
 // CHECK#4
@@ -92,7 +92,7 @@ for (x in mycars){
   fin=-1;
 }
 if(fin!==1){
-  $ERROR('#4: "finally" block must be evaluated at "try{continue} finally" construction');
+  throw new Test262Error('#4: "finally" block must be evaluated at "try{continue} finally" construction');
 }
 
 // CHECK#5
@@ -108,7 +108,7 @@ for (x in mycars){
   c5+=12;
 }
 if(c5!==3){
-  $ERROR('#5: "try catch{continue}" must work correctly');
+  throw new Test262Error('#5: "try catch{continue}" must work correctly');
 }
 
 // CHECK#6
@@ -125,8 +125,8 @@ for (x in mycars){
   fin6=-1;
 }
 if(fin6!==1){
-  $ERROR('#6.1: "finally" block must be evaluated');
+  throw new Test262Error('#6.1: "finally" block must be evaluated');
 }
 if(c6!==3){
-  $ERROR('#6.2: "try finally{continue}" must work correctly');
+  throw new Test262Error('#6.2: "try finally{continue}" must work correctly');
 }
diff --git a/test/language/statements/try/S12.14_A12_T3.js b/test/language/statements/try/S12.14_A12_T3.js
index d2313eef01..dff11b9f92 100644
--- a/test/language/statements/try/S12.14_A12_T3.js
+++ b/test/language/statements/try/S12.14_A12_T3.js
@@ -32,10 +32,10 @@ for (x in mycars){
   c1+=2;
 };
 if(fin!==1){
-  $ERROR('#1.1: "finally" block must be evaluated');
+  throw new Test262Error('#1.1: "finally" block must be evaluated');
 }
 if(c1!==1){
-  $ERROR('#1.2: "try{break}catch finally" must work correctly');
+  throw new Test262Error('#1.2: "try{break}catch finally" must work correctly');
 }
 
 // CHECK#2
@@ -55,10 +55,10 @@ for (x in mycars){
   fin2=-1;
 }
 if(fin2!==1){
-  $ERROR('#2.1: "finally" block must be evaluated');
+  throw new Test262Error('#2.1: "finally" block must be evaluated');
 }
 if(c2!==1){
-  $ERROR('#2.2: "try catch{break} finally" must work correctly');
+  throw new Test262Error('#2.2: "try catch{break} finally" must work correctly');
 }
 
 // CHECK#3
@@ -78,10 +78,10 @@ for (x in mycars){
   fin3=0;
 }
 if(fin3!==1){
-  $ERROR('#3.1: "finally" block must be evaluated');
+  throw new Test262Error('#3.1: "finally" block must be evaluated');
 }
 if(c3!==1){
-  $ERROR('#3.2: "try catch finally{break}" must work correctly');
+  throw new Test262Error('#3.2: "try catch finally{break}" must work correctly');
 }
 
 // CHECK#4
@@ -98,10 +98,10 @@ for (x in mycars){
   c4+=2;
 }
 if(fin4!==1){
-  $ERROR('#4.1: "finally" block must be evaluated');
+  throw new Test262Error('#4.1: "finally" block must be evaluated');
 }
 if(c4!==1){
-  $ERROR('#4.2: "try{break} finally" must work correctly');
+  throw new Test262Error('#4.2: "try{break} finally" must work correctly');
 }
 
 // CHECK#5
@@ -118,7 +118,7 @@ for (x in mycars){
   c5++;
 }
 if(c5!==0){
-  $ERROR('#5: "try catch{break}" must work correctly');
+  throw new Test262Error('#5: "try catch{break}" must work correctly');
 }
 
 // CHECK#6
@@ -132,7 +132,7 @@ for (x in mycars){
   c6+=2;
 }
 if(c6!==1){
-  $ERROR('#6: "try{break} catch" must work correctly');
+  throw new Test262Error('#6: "try{break} catch" must work correctly');
 }
 
 // CHECK#7
@@ -155,8 +155,8 @@ catch(ex1){
   c7=10;
 }
 if(fin7!==1){
-  $ERROR('#7.1: "finally" block must be evaluated');
+  throw new Test262Error('#7.1: "finally" block must be evaluated');
 }
 if(c7!==1){
-  $ERROR('#7.2: "try finally{break}" must work correctly');
+  throw new Test262Error('#7.2: "try finally{break}" must work correctly');
 }
diff --git a/test/language/statements/try/S12.14_A12_T4.js b/test/language/statements/try/S12.14_A12_T4.js
index 91f4e8ad9b..56d3be6e05 100644
--- a/test/language/statements/try/S12.14_A12_T4.js
+++ b/test/language/statements/try/S12.14_A12_T4.js
@@ -31,10 +31,10 @@ for (x in mycars){
   c1+=2;
 }
 if(fin!==1){
-  $ERROR('#1.1: "finally" block must be evaluated');
+  throw new Test262Error('#1.1: "finally" block must be evaluated');
 }
 if(c1!==3){
-  $ERROR('#1.2: "try{break} catch finally{continue}" must work correctly');
+  throw new Test262Error('#1.2: "try{break} catch finally{continue}" must work correctly');
 }
 
 // CHECK#2
@@ -55,8 +55,8 @@ for (x in mycars){
   fin2=-1;
 }
 if(fin2!==1){
-  $ERROR('#2.1: "finally" block must be evaluated');
+  throw new Test262Error('#2.1: "finally" block must be evaluated');
 }
 if(c2!==3){
-  $ERROR('#2.2: "try catch{break} finally{continue}" must work correctly');
+  throw new Test262Error('#2.2: "try catch{break} finally{continue}" must work correctly');
 }
diff --git a/test/language/statements/try/S12.14_A13_T1.js b/test/language/statements/try/S12.14_A13_T1.js
index ce49947cfd..a28ec148cd 100644
--- a/test/language/statements/try/S12.14_A13_T1.js
+++ b/test/language/statements/try/S12.14_A13_T1.js
@@ -13,14 +13,14 @@ function myFunction1(){
     return 1;
   }
   catch(err){
-  	$ERROR('#1.1: "return 1" inside function does not lead to throwing exception');
+  	throw new Test262Error('#1.1: "return 1" inside function does not lead to throwing exception');
     return 0;
   }
   return 2;
 }
 var x1=myFunction1();
 if(x1!==1){
-  $ERROR('#1.2: x1===1. Actual: x1==='+x1);
+  throw new Test262Error('#1.2: x1===1. Actual: x1==='+x1);
 }
 
 // CHECK#2
@@ -35,7 +35,7 @@ function myFunction2(){
 }
 var x2=myFunction2();
 if (x2!==2){
-  $ERROR('#2: x2===2. Actual: x2==='+x2);
+  throw new Test262Error('#2: x2===2. Actual: x2==='+x2);
 }
 
 // CHECK#3
@@ -49,7 +49,7 @@ function myFunction3(){
 }
 var x3=myFunction3();
 if (x3!==1){
-  $ERROR('#3: x3===1. Actual: x3==='+x3);
+  throw new Test262Error('#3: x3===1. Actual: x3==='+x3);
 }
 
 // CHECK#4
@@ -65,13 +65,13 @@ function myFunction4(){
 }
 try{
   var x4=myFunction4();
-  $ERROR('#4.1: Throwing exception inside function lead to throwing exception outside this function');
+  throw new Test262Error('#4.1: Throwing exception inside function lead to throwing exception outside this function');
 }
 catch(e){
   if(e==="ex1"){
-    $ERROR('#4.2: Exception !=="ex1". Actual: catch previous exception');
+    throw new Test262Error('#4.2: Exception !=="ex1". Actual: catch previous exception');
   }
   if(e!=="ex2"){
-    $ERROR('#4.3: Exception ==="ex2". Actual:  Exception ==='+ e  );
+    throw new Test262Error('#4.3: Exception ==="ex2". Actual:  Exception ==='+ e  );
   }
 }
diff --git a/test/language/statements/try/S12.14_A13_T2.js b/test/language/statements/try/S12.14_A13_T2.js
index 10bedab8a9..68edff79cc 100644
--- a/test/language/statements/try/S12.14_A13_T2.js
+++ b/test/language/statements/try/S12.14_A13_T2.js
@@ -19,10 +19,10 @@ function myFunction1(){
 }
 var x1=myFunction1();
 if(x1!==1){
-  $ERROR('#1.1: x1===1. Actual: x1==='+x1);
+  throw new Test262Error('#1.1: x1===1. Actual: x1==='+x1);
 }
 if (c1!==1){
-  $ERROR('#1.2: "finally" block must be evaluated');
+  throw new Test262Error('#1.2: "finally" block must be evaluated');
 }
 
 // CHECK#2
@@ -38,11 +38,11 @@ function myFunction2(){
 }
 try{
   var x2=myFunction2();
-  $ERROR('#2.1: Throwing exception inside function lead to throwing exception outside this function');
+  throw new Test262Error('#2.1: Throwing exception inside function lead to throwing exception outside this function');
 }
 catch(e){
   if (c2!==1){
-    $ERROR('#2.2: "finally" block must be evaluated');
+    throw new Test262Error('#2.2: "finally" block must be evaluated');
   }
 }
 
@@ -58,11 +58,11 @@ function myFunction3(){
 }
 try{
   var x3=myFunction3();
-  $ERROR('#3.1: Throwing exception inside function lead to throwing exception outside this function');
+  throw new Test262Error('#3.1: Throwing exception inside function lead to throwing exception outside this function');
 }
 catch(e){
   if (c3!==1){
-    $ERROR('#3.2: "finally" block must be evaluated');
+    throw new Test262Error('#3.2: "finally" block must be evaluated');
   }
 }
 
@@ -80,11 +80,11 @@ function myFunction4(){
 }
 try{
   var x4=myFunction4();
-  $ERROR('#4.2: Throwing exception inside function lead to throwing exception outside this function');
+  throw new Test262Error('#4.2: Throwing exception inside function lead to throwing exception outside this function');
 }
 catch(e){
   if (c4!==1){
-    $ERROR('#4.3: "finally" block must be evaluated');
+    throw new Test262Error('#4.3: "finally" block must be evaluated');
   }
 }
 
@@ -102,11 +102,11 @@ function myFunction5(){
 }
 try{
   var x5=myFunction5();
-  $ERROR('#5.2: Throwing exception inside function lead to throwing exception outside this function');
+  throw new Test262Error('#5.2: Throwing exception inside function lead to throwing exception outside this function');
 }
 catch(e){
   if (c5!==1){
-    $ERROR('#5.3: "finally" block must be evaluated');
+    throw new Test262Error('#5.3: "finally" block must be evaluated');
   }
 }
 
@@ -125,17 +125,17 @@ function myFunction6(){
 }
 try{
   var x6=myFunction6();
-  $ERROR('#6.1: Throwing exception inside function lead to throwing exception outside this function');
+  throw new Test262Error('#6.1: Throwing exception inside function lead to throwing exception outside this function');
 }
 catch(e){
   if(e==="ex1"){
-    $ERROR('#6.2: Exception !=="ex1". Actual: catch previous exception');
+    throw new Test262Error('#6.2: Exception !=="ex1". Actual: catch previous exception');
   }
   if(e!=="ex2"){
-    $ERROR('#6.3: Exception !=="ex1". Actual: '+e);
+    throw new Test262Error('#6.3: Exception !=="ex1". Actual: '+e);
   }
   if (c6!==1){
-    $ERROR('#6.4: "finally" block must be evaluated');
+    throw new Test262Error('#6.4: "finally" block must be evaluated');
   }
 }
 
@@ -152,10 +152,10 @@ function myFunction7(){
 }
 var x7=myFunction7();
 if(x7!==2){
-  $ERROR('#7.1: "catch" block must be evaluated');
+  throw new Test262Error('#7.1: "catch" block must be evaluated');
 }
 if (c7!==1){
-  $ERROR('#7.2: "finally" block must be evaluated');
+  throw new Test262Error('#7.2: "finally" block must be evaluated');
 }
 
 // CHECK#8
@@ -176,5 +176,5 @@ catch(ex1){
   c8=10;
 }
 if (c8!==1){
-  $ERROR('#8: "finally" block must be evaluated');
+  throw new Test262Error('#8: "finally" block must be evaluated');
 }
diff --git a/test/language/statements/try/S12.14_A13_T3.js b/test/language/statements/try/S12.14_A13_T3.js
index e8efa34d16..e8e5e971bc 100644
--- a/test/language/statements/try/S12.14_A13_T3.js
+++ b/test/language/statements/try/S12.14_A13_T3.js
@@ -13,7 +13,7 @@ function myFunction1(){
   try{
     return 1;
   }catch(err){
-    $ERROR('#1.1: "return 1" inside function does not lead to throwing exception');
+    throw new Test262Error('#1.1: "return 1" inside function does not lead to throwing exception');
     return 0;
   }finally{
     c1=1;
@@ -22,10 +22,10 @@ function myFunction1(){
 }
 var x1=myFunction1();
 if(x1!==1){
-  $ERROR('#1.3: x1===1. Actual: x1==='+x1);
+  throw new Test262Error('#1.3: x1===1. Actual: x1==='+x1);
 }
 if (c1!==1){
-  $ERROR('#1.4: "finally" block must be evaluated');
+  throw new Test262Error('#1.4: "finally" block must be evaluated');
 }
 
 // CHECK#2
@@ -43,10 +43,10 @@ function myFunction2(){
 }
 var x2=myFunction2();
 if (c2!==1){
-  $ERROR('#2.1: "finally" block must be evaluated');
+  throw new Test262Error('#2.1: "finally" block must be evaluated');
 }
 if (x2!==0){
-  $ERROR('#2.2: x2===0. Actual: x2==='+x2);
+  throw new Test262Error('#2.2: x2===0. Actual: x2==='+x2);
 }
 
 // CHECK#3
@@ -63,10 +63,10 @@ function myFunction3(){
 }
 var x3=myFunction3();
 if (c3!==1){
-  $ERROR('#3.1: "finally" block must be evaluated');
+  throw new Test262Error('#3.1: "finally" block must be evaluated');
 }
 if (x3!==1){
-  $ERROR('#3.2: x3===1. Actual: x3==='+x3);
+  throw new Test262Error('#3.2: x3===1. Actual: x3==='+x3);
 }
 
 // CHECK#4
@@ -85,17 +85,17 @@ function myFunction4(){
 }
 try{
   var x4=myFunction4();
-  $ERROR('#4.1: Throwing exception inside function lead to throwing exception outside this function');
+  throw new Test262Error('#4.1: Throwing exception inside function lead to throwing exception outside this function');
 }
 catch(e){
   if(e==="ex1"){
-    $ERROR('#4.2: Exception !== "ex1". Actual: catch previous exception');
+    throw new Test262Error('#4.2: Exception !== "ex1". Actual: catch previous exception');
   }
   if(e!=="ex2"){
-    $ERROR('#4.3: Exception === "ex2". Actual:  Exception ==='+ e  );
+    throw new Test262Error('#4.3: Exception === "ex2". Actual:  Exception ==='+ e  );
   }
   if (c4!==1){
-    $ERROR('#4.4: "finally" block must be evaluated');
+    throw new Test262Error('#4.4: "finally" block must be evaluated');
   }	
 }
 
@@ -115,17 +115,17 @@ function myFunction5(){
 }
 try{
   var x5=myFunction5();
-  $ERROR('#5.1: Throwing exception inside function lead to throwing exception outside this function');
+  throw new Test262Error('#5.1: Throwing exception inside function lead to throwing exception outside this function');
 }
 catch(e){
   if(e==="ex1"){
-    $ERROR('#5.2: Exception !== "ex1". Actual: catch previous exception');
+    throw new Test262Error('#5.2: Exception !== "ex1". Actual: catch previous exception');
   }
   if(e!=="ex2"){
-    $ERROR('#5.3: Exception === "ex2". Actual:  Exception ==='+ e  );
+    throw new Test262Error('#5.3: Exception === "ex2". Actual:  Exception ==='+ e  );
   }
   if (c5!==1){
-    $ERROR('#5.4: "finally" block must be evaluated');
+    throw new Test262Error('#5.4: "finally" block must be evaluated');
   } 	
 }
 
@@ -146,19 +146,19 @@ function myFunction6(){
 }
 try{
   var x6=myFunction6();
-  $ERROR('#6.1: Throwing exception inside function lead to throwing exception outside this function');
+  throw new Test262Error('#6.1: Throwing exception inside function lead to throwing exception outside this function');
 }
 catch(e){
   if(e==="ex1"){
-    $ERROR('#6.2: Exception !== "ex1". Actual: catch previous exception');
+    throw new Test262Error('#6.2: Exception !== "ex1". Actual: catch previous exception');
   }
   if(e==="ex2"){
-    $ERROR('#6.3: Exception !== "ex2". Actual: catch previous exception');
+    throw new Test262Error('#6.3: Exception !== "ex2". Actual: catch previous exception');
   }
   if(e!=="ex3"){
-    $ERROR('#6.4: Exception === "ex3". Actual:  Exception ==='+ e  );
+    throw new Test262Error('#6.4: Exception === "ex3". Actual:  Exception ==='+ e  );
   }	
-  if(c6!==1) $ERROR('#6.5: "finally" block must be evaluated');
+  if(c6!==1) throw new Test262Error('#6.5: "finally" block must be evaluated');
 }
 
 // CHECK#7
@@ -178,7 +178,7 @@ function myFunction7(){
 }
 try{
   var x7=myFunction7();
-  if(x7!==2) $ERROR('#7.1: x7===2. Actual: x7==='+x7);
+  if(x7!==2) throw new Test262Error('#7.1: x7===2. Actual: x7==='+x7);
 }
 catch(e){}
-if(c7!==1) $ERROR('#7.2: "finally" block must be evaluated');
+if(c7!==1) throw new Test262Error('#7.2: "finally" block must be evaluated');
diff --git a/test/language/statements/try/S12.14_A14.js b/test/language/statements/try/S12.14_A14.js
index 7b14a3b41e..097641a247 100644
--- a/test/language/statements/try/S12.14_A14.js
+++ b/test/language/statements/try/S12.14_A14.js
@@ -31,7 +31,7 @@ try{
   }
 }
 catch(e){
-  if (e!=="ex") $ERROR('#1: Exception ==="ex". Actual:  Exception ==='+ e  );
+  if (e!=="ex") throw new Test262Error('#1: Exception ==="ex". Actual:  Exception ==='+ e  );
 }
 
 // CHECK#2
@@ -40,11 +40,11 @@ with(myObj){
     throw p1;
   }
   catch(e){
-    if (e!=="a") $ERROR('#2.1: Exception ==="a". Actual:  Exception ==='+ e  );
+    if (e!=="a") throw new Test262Error('#2.1: Exception ==="a". Actual:  Exception ==='+ e  );
     p1='pass';
   }
 }
-if(myObj.p1!=='pass') $ERROR('#2.2: "throw p1" lead to throwing exception');
+if(myObj.p1!=='pass') throw new Test262Error('#2.2: "throw p1" lead to throwing exception');
 
 // CHECK#3
 with(myObj){
@@ -53,15 +53,15 @@ with(myObj){
     throw p2;
   }
   catch(e){
-    if (e!=="b") $ERROR('#3.1: Exception ==="b". Actual:  Exception ==='+ e  );
+    if (e!=="b") throw new Test262Error('#3.1: Exception ==="b". Actual:  Exception ==='+ e  );
     p1='pass';
   }
   finally{
     p2='pass';
   }
 }
-if(myObj.p1!=='pass') $ERROR('#3.2: "throw p2" lead to throwing exception');
-if(myObj.p2!=='pass') $ERROR('#3.3: "finally" block must be evaluated');
+if(myObj.p1!=='pass') throw new Test262Error('#3.2: "throw p2" lead to throwing exception');
+if(myObj.p2!=='pass') throw new Test262Error('#3.3: "finally" block must be evaluated');
 
 // CHECK#4
 myObj.p1='fail';
@@ -76,4 +76,4 @@ try{
   }
 }
 catch(e){}
-if(myObj.p1!=='pass') $ERROR('#4: "finally" block must be evaluated');
+if(myObj.p1!=='pass') throw new Test262Error('#4: "finally" block must be evaluated');
diff --git a/test/language/statements/try/S12.14_A15.js b/test/language/statements/try/S12.14_A15.js
index 165c98977a..a248b4cf16 100644
--- a/test/language/statements/try/S12.14_A15.js
+++ b/test/language/statements/try/S12.14_A15.js
@@ -28,15 +28,15 @@ function SwitchTest1(value){
     return result;
   }
   catch(e){	
-    if ((value===1)&&(e!==4)) $ERROR('#1.1: Exception ===4. Actual:  Exception ==='+ e  );
-    if ((value===4)&&(e!=="ex")) $ERROR('#1.2: Exception ==="ex". Actual:  Exception ==='+ e  );
+    if ((value===1)&&(e!==4)) throw new Test262Error('#1.1: Exception ===4. Actual:  Exception ==='+ e  );
+    if ((value===4)&&(e!=="ex")) throw new Test262Error('#1.2: Exception ==="ex". Actual:  Exception ==='+ e  );
   }
   finally{
     return result;
   }
 }
-if (SwitchTest1(1)!==4) $ERROR('#1.3: SwitchTest1(1)===4. Actual:  SwitchTest1(1)==='+ SwitchTest1(1) );
-if (SwitchTest1(4)!==64) $ERROR('#1.4: SwitchTest1(4)===64. Actual:  SwitchTest1(4)==='+ SwitchTest1(4) );
+if (SwitchTest1(1)!==4) throw new Test262Error('#1.3: SwitchTest1(1)===4. Actual:  SwitchTest1(1)==='+ SwitchTest1(1) );
+if (SwitchTest1(4)!==64) throw new Test262Error('#1.4: SwitchTest1(4)===64. Actual:  SwitchTest1(4)==='+ SwitchTest1(4) );
 
 // CHECK#2
 var c2=0;
@@ -60,10 +60,10 @@ function SwitchTest2(value){
   }
   return result;
 }
-if (SwitchTest2(1)!==4) $ERROR('#2.1: SwitchTest1(1)===4. Actual:  SwitchTest1(1)==='+ SwitchTest1(1) );
-if (c2===1) $ERROR('#2.2: Evaluate finally block');
-if (SwitchTest2(0)!==2) $ERROR('#2.3: SwitchTest1(0)===2. Actual:  SwitchTest1(0)==='+ SwitchTest1(0) );
-if (c2!==1) $ERROR('#2.4: "finally" block must be evaluated');
+if (SwitchTest2(1)!==4) throw new Test262Error('#2.1: SwitchTest1(1)===4. Actual:  SwitchTest1(1)==='+ SwitchTest1(1) );
+if (c2===1) throw new Test262Error('#2.2: Evaluate finally block');
+if (SwitchTest2(0)!==2) throw new Test262Error('#2.3: SwitchTest1(0)===2. Actual:  SwitchTest1(0)==='+ SwitchTest1(0) );
+if (c2!==1) throw new Test262Error('#2.4: "finally" block must be evaluated');
 
 // CHECK#3
 function SwitchTest3(value){
@@ -85,8 +85,8 @@ function SwitchTest3(value){
 }
 try{
   var x3=SwitchTest3(0);
-  if (x3!==2) $ERROR('#3.1: x3===2. Actual: x3==='+x3);
+  if (x3!==2) throw new Test262Error('#3.1: x3===2. Actual: x3==='+x3);
 }
 catch(e){
-  $ERROR('#3.2: Catching exception inside function does not lead to throwing exception outside this function');
+  throw new Test262Error('#3.2: Catching exception inside function does not lead to throwing exception outside this function');
 }
diff --git a/test/language/statements/try/S12.14_A17.js b/test/language/statements/try/S12.14_A17.js
index a5512f2b24..e2ce5a7547 100644
--- a/test/language/statements/try/S12.14_A17.js
+++ b/test/language/statements/try/S12.14_A17.js
@@ -11,11 +11,11 @@ var i=1;
 function Integer( value, exception ) {
   try{
     this.value = checkValue( value );
-    if(exception) $ERROR('#'+i+'.1: Must be exception');
+    if(exception) throw new Test262Error('#'+i+'.1: Must be exception');
   }
   catch(e){
     this.value = e.toString();
-    if(!exception) $ERROR('#'+i+'.2: Don`t must be exception');
+    if(!exception) throw new Test262Error('#'+i+'.2: Don`t must be exception');
   }
   i++;
 }
diff --git a/test/language/statements/try/S12.14_A18_T1.js b/test/language/statements/try/S12.14_A18_T1.js
index 177ead44b4..863411d745 100644
--- a/test/language/statements/try/S12.14_A18_T1.js
+++ b/test/language/statements/try/S12.14_A18_T1.js
@@ -12,5 +12,5 @@ try{
   throw undefined;
 }
 catch(e){
-  if (e!==undefined) $ERROR('#1: Exception === undefined. Actual: '+e);
+  if (e!==undefined) throw new Test262Error('#1: Exception === undefined. Actual: '+e);
 }
diff --git a/test/language/statements/try/S12.14_A18_T2.js b/test/language/statements/try/S12.14_A18_T2.js
index 87159a3419..2d11fe1408 100644
--- a/test/language/statements/try/S12.14_A18_T2.js
+++ b/test/language/statements/try/S12.14_A18_T2.js
@@ -12,5 +12,5 @@ try{
   throw null;
 }
 catch(e){
-  if (e!==null) $ERROR('#1: Exception ===null. Actual: '+e);
+  if (e!==null) throw new Test262Error('#1: Exception ===null. Actual: '+e);
 }
diff --git a/test/language/statements/try/S12.14_A18_T3.js b/test/language/statements/try/S12.14_A18_T3.js
index 7ff931f52a..e0484373c8 100644
--- a/test/language/statements/try/S12.14_A18_T3.js
+++ b/test/language/statements/try/S12.14_A18_T3.js
@@ -12,7 +12,7 @@ try{
   throw true;
 }
 catch(e){
-  if (e!==true) $ERROR('#1: Exception ===true. Actual:  Exception ==='+ e  );
+  if (e!==true) throw new Test262Error('#1: Exception ===true. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#2
@@ -20,7 +20,7 @@ try{
   throw false;
 }
 catch(e){
-  if (e!==false) $ERROR('#2: Exception ===false. Actual:  Exception ==='+ e  );
+  if (e!==false) throw new Test262Error('#2: Exception ===false. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#3
@@ -29,7 +29,7 @@ try{
   throw b;
 }
 catch(e){
-  if (e!==false) $ERROR('#3: Exception ===false. Actual:  Exception ==='+ e  );
+  if (e!==false) throw new Test262Error('#3: Exception ===false. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#4
@@ -38,7 +38,7 @@ try{
   throw b;
 }
 catch(e){
-  if (e!==true) $ERROR('#4: Exception ===true. Actual:  Exception ==='+ e  );
+  if (e!==true) throw new Test262Error('#4: Exception ===true. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#5
@@ -47,7 +47,7 @@ try{
   throw b&&false;
 }
 catch(e){
-  if (e!==false) $ERROR('#5: Exception ===false. Actual:  Exception ==='+ e  );
+  if (e!==false) throw new Test262Error('#5: Exception ===false. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#5
@@ -56,5 +56,5 @@ try{
   throw b||false;
 }
 catch(e){
-  if (e!==true) $ERROR('#6: Exception ===true. Actual:  Exception ==='+ e  );
+  if (e!==true) throw new Test262Error('#6: Exception ===true. Actual:  Exception ==='+ e  );
 }
diff --git a/test/language/statements/try/S12.14_A18_T4.js b/test/language/statements/try/S12.14_A18_T4.js
index c657105dbe..6598a75e05 100644
--- a/test/language/statements/try/S12.14_A18_T4.js
+++ b/test/language/statements/try/S12.14_A18_T4.js
@@ -12,7 +12,7 @@ try{
   throw "exception #1";
 }
 catch(e){
-  if (e!=="exception #1") $ERROR('#1: Exception ==="exception #1". Actual:  Exception ==='+ e  );
+  if (e!=="exception #1") throw new Test262Error('#1: Exception ==="exception #1". Actual:  Exception ==='+ e  );
 }
 
 // CHECK#2
@@ -20,7 +20,7 @@ try{
   throw "exception"+" #1";
 }
 catch(e){
-  if (e!=="exception #1") $ERROR('#2: Exception ==="exception #1". Actual:  Exception ==='+ e  );
+  if (e!=="exception #1") throw new Test262Error('#2: Exception ==="exception #1". Actual:  Exception ==='+ e  );
 }
 
 // CHECK#3
@@ -29,7 +29,7 @@ try{
   throw b;
 }
 catch(e){
-  if (e!=="exception #1") $ERROR('#3: Exception ==="exception #1". Actual:  Exception ==='+ e  );
+  if (e!=="exception #1") throw new Test262Error('#3: Exception ==="exception #1". Actual:  Exception ==='+ e  );
 }
 
 // CHECK#4
@@ -39,5 +39,5 @@ try{
   throw a+b;
 }
 catch(e){
-  if (e!=="exception #1") $ERROR('#4: Exception ==="exception #1". Actual:  Exception ==='+ e  );
+  if (e!=="exception #1") throw new Test262Error('#4: Exception ==="exception #1". Actual:  Exception ==='+ e  );
 }
diff --git a/test/language/statements/try/S12.14_A18_T5.js b/test/language/statements/try/S12.14_A18_T5.js
index 13a92ab507..7f39a402ef 100644
--- a/test/language/statements/try/S12.14_A18_T5.js
+++ b/test/language/statements/try/S12.14_A18_T5.js
@@ -12,7 +12,7 @@ try{
   throw 13;
 }
 catch(e){
-  if (e!==13) $ERROR('#1: Exception ===13. Actual:  Exception ==='+ e  );
+  if (e!==13) throw new Test262Error('#1: Exception ===13. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#2
@@ -20,7 +20,7 @@ try{
   throw 10+3;
 }
 catch(e){
-  if (e!==13) $ERROR('#2: Exception ===13. Actual:  Exception ==='+ e  );
+  if (e!==13) throw new Test262Error('#2: Exception ===13. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#3
@@ -29,7 +29,7 @@ try{
   throw b;
 }
 catch(e){
-  if (e!==13) $ERROR('#3: Exception ===13. Actual:  Exception ==='+ e  );
+  if (e!==13) throw new Test262Error('#3: Exception ===13. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#4
@@ -39,7 +39,7 @@ try{
   throw a+b;
 }
 catch(e){
-  if (e!==13) $ERROR('#4: Exception ===13. Actual:  Exception ==='+ e  );
+  if (e!==13) throw new Test262Error('#4: Exception ===13. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#5
@@ -47,7 +47,7 @@ try{
   throw 2.13;
 }
 catch(e){
-  if (e!==2.13) $ERROR('#5: Exception ===2.13. Actual:  Exception ==='+ e  );
+  if (e!==2.13) throw new Test262Error('#5: Exception ===2.13. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#6
@@ -56,7 +56,7 @@ try{
   throw 2/3;
 }
 catch(e){
-  if (e!==ex) $ERROR('#6: Exception ===2/3. Actual:  Exception ==='+ e  );
+  if (e!==ex) throw new Test262Error('#6: Exception ===2/3. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#7
@@ -72,7 +72,7 @@ try{
   throw +Infinity;
 }
 catch(e){
-  if (e!==+Infinity) $ERROR('#8: Exception ===+Infinity. Actual:  Exception ==='+ e  );
+  if (e!==+Infinity) throw new Test262Error('#8: Exception ===+Infinity. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#9
@@ -80,7 +80,7 @@ try{
   throw -Infinity;
 }
 catch(e){
-  if (e!==-Infinity) $ERROR('#9: Exception ===-Infinity. Actual:  Exception ==='+ e  );
+  if (e!==-Infinity) throw new Test262Error('#9: Exception ===-Infinity. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#10
@@ -88,7 +88,7 @@ try{
   throw +0;
 }
 catch(e){
-  if (e!==+0) $ERROR('#10: Exception ===+0. Actual:  Exception ==='+ e  );
+  if (e!==+0) throw new Test262Error('#10: Exception ===+0. Actual:  Exception ==='+ e  );
 }
 
 // CHECK#11
@@ -96,5 +96,5 @@ try{
   throw -0;
 }
 catch(e){
-  if (e!==-0) $ERROR('#11: Exception ===-0. Actual:  Exception ==='+ e  );
+  if (e!==-0) throw new Test262Error('#11: Exception ===-0. Actual:  Exception ==='+ e  );
 }
diff --git a/test/language/statements/try/S12.14_A18_T6.js b/test/language/statements/try/S12.14_A18_T6.js
index bb19b2a1bd..eb39411602 100644
--- a/test/language/statements/try/S12.14_A18_T6.js
+++ b/test/language/statements/try/S12.14_A18_T6.js
@@ -27,11 +27,11 @@ try{
 }
 catch(e){	
 // CHECK#1
-  if (e.p1!=="a") $ERROR('#1: e.p1==="a". Actual:  e.p1==='+ e.p1 );
+  if (e.p1!=="a") throw new Test262Error('#1: e.p1==="a". Actual:  e.p1==='+ e.p1 );
 // CHECK#2
-  if (e.value!=='myObj_value') $ERROR('#2: e.value===\'myObj_value\'. Actual:  e.value==='+ e.value );
+  if (e.value!=='myObj_value') throw new Test262Error('#2: e.value===\'myObj_value\'. Actual:  e.value==='+ e.value );
 // CHECK#3
-  if (e.eval()!=='obj_eval') $ERROR('#3: e.eval()===\'obj_eval\'. Actual:  e.eval()==='+ e.eval() );
+  if (e.eval()!=='obj_eval') throw new Test262Error('#3: e.eval()===\'obj_eval\'. Actual:  e.eval()==='+ e.eval() );
 }
 
 // CHECK#4
@@ -40,7 +40,7 @@ try{
   throw myObj;
 }
 catch(e){}
-if (myObj.i!==6) $ERROR('#4: Handling of catch must be correct');
+if (myObj.i!==6) throw new Test262Error('#4: Handling of catch must be correct');
 
 // CHECK#5
 myObj.i=6;
@@ -50,4 +50,4 @@ try{
 catch(e){
   e.i=10;
 }
-if (myObj.i!==10) $ERROR('#5: Handling of catch must be correct');
+if (myObj.i!==10) throw new Test262Error('#5: Handling of catch must be correct');
diff --git a/test/language/statements/try/S12.14_A18_T7.js b/test/language/statements/try/S12.14_A18_T7.js
index 28acd80f12..9b0c52c5c8 100644
--- a/test/language/statements/try/S12.14_A18_T7.js
+++ b/test/language/statements/try/S12.14_A18_T7.js
@@ -23,7 +23,7 @@ try{
 }
 catch(e){
   for (var i=0;i<3;i++){
-    if (e[i]!==mycars[i]) $ERROR('#1.'+i+': Exception['+i+']===mycars['+i+']. Actual:  Exception['+i+']==='+ e[i] );
+    if (e[i]!==mycars[i]) throw new Test262Error('#1.'+i+': Exception['+i+']===mycars['+i+']. Actual:  Exception['+i+']==='+ e[i] );
   }
 }
 
@@ -33,10 +33,10 @@ try{
 }
 catch(e){
   for (var i=0;i<3;i++){
-    if (e[i]!==mycars[i]) $ERROR('#2.'+i+': Exception['+i+']===mycars['+i+']. Actual:  Exception['+i+']==='+ e[i] );
+    if (e[i]!==mycars[i]) throw new Test262Error('#2.'+i+': Exception['+i+']===mycars['+i+']. Actual:  Exception['+i+']==='+ e[i] );
   }
   for (var i=3;i<6;i++){
-    if (e[i]!==mycars2[i-3]) $ERROR('#2.'+i+': Exception['+i+']===mycars2['+i+']. Actual:  Exception['+i+']==='+ e[i] );
+    if (e[i]!==mycars2[i-3]) throw new Test262Error('#2.'+i+': Exception['+i+']===mycars2['+i+']. Actual:  Exception['+i+']==='+ e[i] );
   }
 }
 
@@ -46,7 +46,7 @@ try{
 }
 catch(e){
   for (var i=0;i<3;i++){
-    if (e[i]!==mycars2[i]) $ERROR('#3.'+i+': Exception['+i+']===mycars2['+i+']. Actual:  Exception['+i+']==='+ e[i]);
+    if (e[i]!==mycars2[i]) throw new Test262Error('#3.'+i+': Exception['+i+']===mycars2['+i+']. Actual:  Exception['+i+']==='+ e[i]);
   }
 }
 
@@ -56,9 +56,9 @@ try{
 }
 catch(e){
   for (var i=0;i<3;i++){
-    if (e[i]!==mycars[i]) $ERROR('#4.'+i+': Exception['+i+']===mycars['+i+']. Actual:  Exception['+i+']==='+ e[i] );
+    if (e[i]!==mycars[i]) throw new Test262Error('#4.'+i+': Exception['+i+']===mycars['+i+']. Actual:  Exception['+i+']==='+ e[i] );
   }
   for (var i=3;i<6;i++){
-    if (e[i]!==mycars2[i-3]) $ERROR('#4.'+i+': Exception['+i+']===mycars2['+(i-3)+']. Actual:  Exception['+i+']==='+ e[i]);
+    if (e[i]!==mycars2[i-3]) throw new Test262Error('#4.'+i+': Exception['+i+']===mycars2['+(i-3)+']. Actual:  Exception['+i+']==='+ e[i]);
   }
 }
diff --git a/test/language/statements/try/S12.14_A19_T1.js b/test/language/statements/try/S12.14_A19_T1.js
index f7b07420d7..bb87d9835b 100644
--- a/test/language/statements/try/S12.14_A19_T1.js
+++ b/test/language/statements/try/S12.14_A19_T1.js
@@ -12,7 +12,7 @@ try{
   throw (Error("hello"));
 }
 catch(e){
-  if (e.toString()!=="Error: hello") $ERROR('#1: Exception.toString()==="Error: hello". Actual: Exception is '+e);
+  if (e.toString()!=="Error: hello") throw new Test262Error('#1: Exception.toString()==="Error: hello". Actual: Exception is '+e);
 }
 
 // CHECK#2
@@ -20,7 +20,7 @@ try{
   throw (new Error("hello"));
 }
 catch(e){
-  if (e.toString()!=="Error: hello") $ERROR('#2: Exception.toString()==="Error: hello". Actual: Exception is '+e);
+  if (e.toString()!=="Error: hello") throw new Test262Error('#2: Exception.toString()==="Error: hello". Actual: Exception is '+e);
 }
 
 // CHECK#3
@@ -29,7 +29,7 @@ try{
   throw EvalError(1);
 }
 catch(e){
-  if (e.toString()!=="EvalError: 1") $ERROR('#3: Exception.toString()==="EvalError: 1". Actual: Exception is '+e);
+  if (e.toString()!=="EvalError: 1") throw new Test262Error('#3: Exception.toString()==="EvalError: 1". Actual: Exception is '+e);
 }
 
 // CHECK#4
@@ -37,7 +37,7 @@ try{
   throw RangeError(1);
 }
 catch(e){
-  if (e.toString()!=="RangeError: 1") $ERROR('#4: Exception.toString()==="RangeError: 1". Actual: Exception is '+e);
+  if (e.toString()!=="RangeError: 1") throw new Test262Error('#4: Exception.toString()==="RangeError: 1". Actual: Exception is '+e);
 }
 
 // CHECK#5
@@ -45,7 +45,7 @@ try{
   throw ReferenceError(1);
 }
 catch(e){
-  if (e.toString()!=="ReferenceError: 1") $ERROR('#5: Exception.toString()==="ReferenceError: 1". Actual: Exception is '+e);
+  if (e.toString()!=="ReferenceError: 1") throw new Test262Error('#5: Exception.toString()==="ReferenceError: 1". Actual: Exception is '+e);
 }
 
 // CHECK#6
@@ -54,7 +54,7 @@ try{
   throw TypeError(1);
 }
 catch(e){
-  if (e.toString()!=="TypeError: 1") $ERROR('#6: Exception.toString()==="TypeError: 1". Actual: Exception is '+e);
+  if (e.toString()!=="TypeError: 1") throw new Test262Error('#6: Exception.toString()==="TypeError: 1". Actual: Exception is '+e);
 }
 
 // CHECK#7
@@ -62,5 +62,5 @@ try{
   throw URIError("message", "fileName", "1"); 
 }
 catch(e){
-  if (e.toString()!=="URIError: message") $ERROR('#7: Exception.toString()==="URIError: message". Actual: Exception is '+e);
+  if (e.toString()!=="URIError: message") throw new Test262Error('#7: Exception.toString()==="URIError: message". Actual: Exception is '+e);
 }
diff --git a/test/language/statements/try/S12.14_A19_T2.js b/test/language/statements/try/S12.14_A19_T2.js
index bbf4fbed66..908281eca9 100644
--- a/test/language/statements/try/S12.14_A19_T2.js
+++ b/test/language/statements/try/S12.14_A19_T2.js
@@ -13,12 +13,12 @@ try{
   throw (Error("hello"));
 }
 catch(e){
-  if (e.toString()!=="Error: hello") $ERROR('#1.1: Exception.toString()==="Error: hello". Actual: Exception is '+e);
+  if (e.toString()!=="Error: hello") throw new Test262Error('#1.1: Exception.toString()==="Error: hello". Actual: Exception is '+e);
 }
 finally{
   fin=1;
 }
-if (fin!==1) $ERROR('#1.2: "finally" block must be evaluated'); 
+if (fin!==1) throw new Test262Error('#1.2: "finally" block must be evaluated'); 
 
 // CHECK#2
 fin=0;
@@ -26,12 +26,12 @@ try{
   throw (new Error("hello"));
 }
 catch(e){
-  if (e.toString()!=="Error: hello") $ERROR('#2.1: Exception.toString()==="Error: hello". Actual: Exception is '+e);
+  if (e.toString()!=="Error: hello") throw new Test262Error('#2.1: Exception.toString()==="Error: hello". Actual: Exception is '+e);
 }
 finally{
   fin=1;
 }
-if (fin!==1) $ERROR('#2.2: "finally" block must be evaluated'); 
+if (fin!==1) throw new Test262Error('#2.2: "finally" block must be evaluated'); 
 
 // CHECK#3
 fin=0;
@@ -40,12 +40,12 @@ try{
   throw EvalError(1);
 }
 catch(e){
-  if (e.toString()!=="EvalError: 1") $ERROR('#3.1: Exception.toString()==="EvalError: 1". Actual: Exception is '+e);
+  if (e.toString()!=="EvalError: 1") throw new Test262Error('#3.1: Exception.toString()==="EvalError: 1". Actual: Exception is '+e);
 }
 finally{
   fin=1;
 }
-if (fin!==1) $ERROR('#3.2: "finally" block must be evaluated'); 
+if (fin!==1) throw new Test262Error('#3.2: "finally" block must be evaluated'); 
 
 // CHECK#4
 fin=0;
@@ -53,12 +53,12 @@ try{
   throw RangeError(1);
 }
 catch(e){
-  if (e.toString()!=="RangeError: 1") $ERROR('#4.1: Exception.toString()==="RangeError: 1". Actual: Exception is '+e);
+  if (e.toString()!=="RangeError: 1") throw new Test262Error('#4.1: Exception.toString()==="RangeError: 1". Actual: Exception is '+e);
 }
 finally{
   fin=1;
 }
-if (fin!==1) $ERROR('#4.2: "finally" block must be evaluated'); 
+if (fin!==1) throw new Test262Error('#4.2: "finally" block must be evaluated'); 
 
 // CHECK#5
 fin=0;
@@ -66,12 +66,12 @@ try{
   throw ReferenceError(1);
 }
 catch(e){
-  if (e.toString()!=="ReferenceError: 1") $ERROR('#5.1: Exception.toString()==="ReferenceError: 1". Actual: Exception is '+e);
+  if (e.toString()!=="ReferenceError: 1") throw new Test262Error('#5.1: Exception.toString()==="ReferenceError: 1". Actual: Exception is '+e);
 }
 finally{
   fin=1;
 }
-if (fin!==1) $ERROR('#5.2: "finally" block must be evaluated'); 
+if (fin!==1) throw new Test262Error('#5.2: "finally" block must be evaluated'); 
 
 // CHECK#6
 fin=0;
@@ -79,12 +79,12 @@ try{
   throw TypeError(1);
 }
 catch(e){
-  if (e.toString()!=="TypeError: 1") $ERROR('#6.1: Exception.toString()==="TypeError: 1". Actual: Exception is '+e);
+  if (e.toString()!=="TypeError: 1") throw new Test262Error('#6.1: Exception.toString()==="TypeError: 1". Actual: Exception is '+e);
 }
 finally{
   fin=1;
 }
-if (fin!==1) $ERROR('#6.2: "finally" block must be evaluated'); 
+if (fin!==1) throw new Test262Error('#6.2: "finally" block must be evaluated'); 
 
 // CHECK#7
 fin=0;
@@ -92,9 +92,9 @@ try{
   throw URIError("message", "fileName", "1"); 
 }
 catch(e){
-  if (e.toString()!=="URIError: message") $ERROR('#7.1: Exception.toString()==="URIError: message". Actual: Exception is '+e);
+  if (e.toString()!=="URIError: message") throw new Test262Error('#7.1: Exception.toString()==="URIError: message". Actual: Exception is '+e);
 }
 finally{
   fin=1;
 }
-if (fin!==1) $ERROR('#7.2: "finally" block must be evaluated');
+if (fin!==1) throw new Test262Error('#7.2: "finally" block must be evaluated');
diff --git a/test/language/statements/try/S12.14_A2.js b/test/language/statements/try/S12.14_A2.js
index 86203704e8..63a5f7b60f 100644
--- a/test/language/statements/try/S12.14_A2.js
+++ b/test/language/statements/try/S12.14_A2.js
@@ -12,7 +12,7 @@ description: >
 // CHECK#1
 try {
   throw "catchme";	
-  $ERROR('#1: throw "catchme" lead to throwing exception');
+  throw new Test262Error('#1: throw "catchme" lead to throwing exception');
 }
 catch(e){}
 
@@ -21,14 +21,14 @@ var c2=0;
 try{
   try{
     throw "exc";
-    $ERROR('#2.1: throw "exc" lead to throwing exception');
+    throw new Test262Error('#2.1: throw "exc" lead to throwing exception');
   }finally{
     c2=1;
   }
 }
 catch(e){
   if (c2!==1){
-    $ERROR('#2.2: "finally" block must be evaluated');
+    throw new Test262Error('#2.2: "finally" block must be evaluated');
   }
 }
  
@@ -36,7 +36,7 @@ catch(e){
 var c3=0;
 try{
   throw "exc";
-  $ERROR('#3.1: throw "exc" lead to throwing exception');
+  throw new Test262Error('#3.1: throw "exc" lead to throwing exception');
 }
 catch(err){  	
   var x3=1;
@@ -45,8 +45,8 @@ finally{
   c3=1;
 }
 if (x3!==1){
-  $ERROR('#3.2: "catch" block must be evaluated');
+  throw new Test262Error('#3.2: "catch" block must be evaluated');
 }  
 if (c3!==1){
-  $ERROR('#3.3: "finally" block must be evaluated');
+  throw new Test262Error('#3.3: "finally" block must be evaluated');
 }
diff --git a/test/language/statements/try/S12.14_A3.js b/test/language/statements/try/S12.14_A3.js
index 5250db2f53..f660739b7e 100644
--- a/test/language/statements/try/S12.14_A3.js
+++ b/test/language/statements/try/S12.14_A3.js
@@ -10,7 +10,7 @@ description: Checking if execution of "catch" catches system exceptions
 // CHECK#1
 try{
   y;
-  $ERROR('#1: "y" lead to throwing exception');
+  throw new Test262Error('#1: "y" lead to throwing exception');
 }
 catch(e){}
 
@@ -19,7 +19,7 @@ var c2=0;
 try{
   try{
     someValue;
-    $ERROR('#3.1: "someValues" lead to throwing exception');
+    throw new Test262Error('#3.1: "someValues" lead to throwing exception');
   }
   finally{
     c2=1;
@@ -27,7 +27,7 @@ try{
 }
 catch(e){
   if (c2!==1){
-    $ERROR('#3.2: "finally" block must be evaluated');
+    throw new Test262Error('#3.2: "finally" block must be evaluated');
   }
 }
 
@@ -35,7 +35,7 @@ catch(e){
 var c3=0,x3=0;
 try{
   x3=someValue;
-  $ERROR('#3.1: "x3=someValues" lead to throwing exception');
+  throw new Test262Error('#3.1: "x3=someValues" lead to throwing exception');
 }
 catch(err){  	
   x3=1;
@@ -44,8 +44,8 @@ finally{
   c3=1;
 }
 if (x3!==1){
-  $ERROR('#3.2: "catch" block must be evaluated');
+  throw new Test262Error('#3.2: "catch" block must be evaluated');
 }
 if (c3!==1){
-  $ERROR('#3.3: "finally" block must be evaluated');
+  throw new Test262Error('#3.3: "finally" block must be evaluated');
 }
diff --git a/test/language/statements/try/S12.14_A4.js b/test/language/statements/try/S12.14_A4.js
index 3a4679c846..0502b6d695 100644
--- a/test/language/statements/try/S12.14_A4.js
+++ b/test/language/statements/try/S12.14_A4.js
@@ -11,25 +11,25 @@ flags: [noStrict]
 // CHECK#1
 try {
   throw "catchme";
-  $ERROR('#1.1: throw "catchme" lead to throwing exception');
+  throw new Test262Error('#1.1: throw "catchme" lead to throwing exception');
 }
 catch (e) {
   if (delete e){
-    $ERROR('#1.2: Exception has DontDelete property');
+    throw new Test262Error('#1.2: Exception has DontDelete property');
   }
   if (e!=="catchme") {
-    $ERROR('#1.3: Exception === "catchme". Actual:  Exception ==='+ e  );
+    throw new Test262Error('#1.3: Exception === "catchme". Actual:  Exception ==='+ e  );
   }
 }
 
 // CHECK#2
 try {
   throw "catchme";
-  $ERROR('#2.1: throw "catchme" lead to throwing exception');
+  throw new Test262Error('#2.1: throw "catchme" lead to throwing exception');
 }
 catch(e){}
 try{
   e;
-  $ERROR('#2.2: Deleting catching exception after ending "catch" block');
+  throw new Test262Error('#2.2: Deleting catching exception after ending "catch" block');
 }
 catch(err){}
diff --git a/test/language/statements/try/S12.14_A5.js b/test/language/statements/try/S12.14_A5.js
index 8623f28f2b..afad0910ae 100644
--- a/test/language/statements/try/S12.14_A5.js
+++ b/test/language/statements/try/S12.14_A5.js
@@ -13,14 +13,14 @@ description: Checking "catch" catches the Identifier in appropriate way
 try {
   throw "catchme";	
   throw "dontcatchme";
-  $ERROR('#1.1: throw "catchme" lead to throwing exception');
+  throw new Test262Error('#1.1: throw "catchme" lead to throwing exception');
 }
 catch (e) {
   if(e==="dontcatchme"){
-    $ERROR('#1.2: Exception !== "dontcatchme"');
+    throw new Test262Error('#1.2: Exception !== "dontcatchme"');
   }
   if (e!=="catchme") {
-    $ERROR('#1.3: Exception === "catchme". Actual:  Exception ==='+ e  );
+    throw new Test262Error('#1.3: Exception === "catchme". Actual:  Exception ==='+ e  );
   }
 }
 
@@ -40,12 +40,12 @@ function SwitchTest1(value){
   return result;
   }
   catch(e){	
-    if ((value===1)&&(e!==4)) $ERROR('#2.1: Exception === 4. Actual: '+e);
-    if ((value===4)&&(e!=="ex"))$ERROR('#2.2: Exception === "ex". Actual: '+e);
+    if ((value===1)&&(e!==4)) throw new Test262Error('#2.1: Exception === 4. Actual: '+e);
+    if ((value===4)&&(e!=="ex"))throw new Test262Error('#2.2: Exception === "ex". Actual: '+e);
   }
   finally{
     return result;
   }
 }
-if (SwitchTest1(1)!==4) $ERROR('#2.3: "finally" block must be evaluated');
-if (SwitchTest1(4)!==64)$ERROR('#2.4: "finally" block must be evaluated');
+if (SwitchTest1(1)!==4) throw new Test262Error('#2.3: "finally" block must be evaluated');
+if (SwitchTest1(4)!==64)throw new Test262Error('#2.4: "finally" block must be evaluated');
diff --git a/test/language/statements/try/S12.14_A6.js b/test/language/statements/try/S12.14_A6.js
index 2daaa143e2..dc1928f957 100644
--- a/test/language/statements/try/S12.14_A6.js
+++ b/test/language/statements/try/S12.14_A6.js
@@ -14,13 +14,13 @@ var c1=0;
 try {
   c1+=1;
   y;
-  $ERROR('#1.1: "y" lead to throwing exception');
+  throw new Test262Error('#1.1: "y" lead to throwing exception');
 }
 catch (e) {
   c1*=2;
 }
 if (c1!==2){
-  $ERROR('#1.2: Sequence evaluation of commands try/catch is 1. try, 2. catch');	
+  throw new Test262Error('#1.2: Sequence evaluation of commands try/catch is 1. try, 2. catch');	
 }
 
 // CHECK#2
@@ -32,7 +32,7 @@ finally{
   c2*=2;
 }
 if (c2!==2){
-  $ERROR('#2: Sequence evaluation of commands try/finally is 1. try, 2. finally');
+  throw new Test262Error('#2: Sequence evaluation of commands try/finally is 1. try, 2. finally');
 }
 
 // CHECK#3
@@ -48,7 +48,7 @@ finally{
   c3+=1;
 }
 if (c3!==3){
-  $ERROR('#3: Sequence evaluation of commands try/catch/finally(with exception) is 1. try, 2. catch, 3. finally');
+  throw new Test262Error('#3: Sequence evaluation of commands try/catch/finally(with exception) is 1. try, 2. catch, 3. finally');
 }	
 
 // CHECK#4
@@ -63,5 +63,5 @@ finally{
   c4+=1;
 }
 if (c4!==2){
-  $ERROR('#4: Sequence evaluation of commands try/catch/finally(without exception) is 1. try, 2. finally');
+  throw new Test262Error('#4: Sequence evaluation of commands try/catch/finally(without exception) is 1. try, 2. finally');
 }
diff --git a/test/language/statements/try/S12.14_A7_T1.js b/test/language/statements/try/S12.14_A7_T1.js
index f44b2b6c8e..614001e42b 100644
--- a/test/language/statements/try/S12.14_A7_T1.js
+++ b/test/language/statements/try/S12.14_A7_T1.js
@@ -16,13 +16,13 @@ try{
   }
   catch(er2){
     if (er2!=="ex2")
-      $ERROR('#1.1: Exception === "ex2". Actual:  Exception ==='+ e  );
+      throw new Test262Error('#1.1: Exception === "ex2". Actual:  Exception ==='+ e  );
       throw "ex1";
     }
   }
   catch(er1){
-    if (er1!=="ex1") $ERROR('#1.2: Exception === "ex1". Actual: '+er1);
-    if (er1==="ex2") $ERROR('#1.3: Exception !== "ex2". Actual: catch previous embedded exception');
+    if (er1!=="ex1") throw new Test262Error('#1.2: Exception === "ex1". Actual: '+er1);
+    if (er1==="ex2") throw new Test262Error('#1.3: Exception !== "ex2". Actual: catch previous embedded exception');
 }
 
 // CHECK#2
@@ -34,11 +34,11 @@ catch(er1){
     throw "ex2";
   }
   catch(er1){
-    if (er1==="ex1") $ERROR('#2.1: Exception !== "ex1". Actual: catch previous catching exception');
-    if (er1!=="ex2") $ERROR('#2.2: Exception === "ex2". Actual:  Exception ==='+ er1  );
+    if (er1==="ex1") throw new Test262Error('#2.1: Exception !== "ex1". Actual: catch previous catching exception');
+    if (er1!=="ex2") throw new Test262Error('#2.2: Exception === "ex2". Actual:  Exception ==='+ er1  );
   }
-  if (er1!=="ex1") $ERROR('#2.3: Exception === "ex1". Actual:  Exception ==='+ er1  );
-  if (er1==="ex2") $ERROR('#2.4: Exception !== "ex2". Actual: catch previous catching exception');
+  if (er1!=="ex1") throw new Test262Error('#2.3: Exception === "ex1". Actual:  Exception ==='+ er1  );
+  if (er1==="ex2") throw new Test262Error('#2.4: Exception !== "ex2". Actual: catch previous catching exception');
 }
 
 // CHECK#3
@@ -46,15 +46,15 @@ try{
   throw "ex1";
 }
 catch(er1){
-  if (er1!=="ex1") $ERROR('#3.1: Exception ==="ex1". Actual:  Exception ==='+ er1  );
+  if (er1!=="ex1") throw new Test262Error('#3.1: Exception ==="ex1". Actual:  Exception ==='+ er1  );
 }
 finally{
   try{
     throw "ex2";
   }
   catch(er1){
-    if (er1==="ex1") $ERROR('#3.2: Exception !=="ex1". Actual: catch previous embedded exception');
-    if (er1!=="ex2") $ERROR('#3.3: Exception ==="ex2". Actual:  Exception ==='+ er1  );
+    if (er1==="ex1") throw new Test262Error('#3.2: Exception !=="ex1". Actual: catch previous embedded exception');
+    if (er1!=="ex2") throw new Test262Error('#3.3: Exception ==="ex2". Actual:  Exception ==='+ er1  );
   }
 }
 
@@ -68,16 +68,16 @@ catch(er1){
     throw "ex2";
   }
   catch(er1){
-    if (er1==="ex1") $ERROR('#4.1: Exception !=="ex1". Actual: catch previous catching exception');
-    if (er1!=="ex2") $ERROR('#4.2: Exception ==="ex2". Actual:  Exception ==='+ er1  );
+    if (er1==="ex1") throw new Test262Error('#4.1: Exception !=="ex1". Actual: catch previous catching exception');
+    if (er1!=="ex2") throw new Test262Error('#4.2: Exception ==="ex2". Actual:  Exception ==='+ er1  );
   }
-  if (er1!=="ex1") $ERROR('#4.3: Exception ==="ex1". Actual:  Exception ==='+ er1  );
-  if (er1==="ex2") $ERROR('#4.4: Exception !=="ex2". Actual: Catch previous embedded exception');
+  if (er1!=="ex1") throw new Test262Error('#4.3: Exception ==="ex1". Actual:  Exception ==='+ er1  );
+  if (er1==="ex2") throw new Test262Error('#4.4: Exception !=="ex2". Actual: Catch previous embedded exception');
 }
 finally{
   c4=1;
 }
-if (c4!==1) $ERROR('#4.5: "finally" block must be evaluated');
+if (c4!==1) throw new Test262Error('#4.5: "finally" block must be evaluated');
 
 // CHECK#5
 var c5=0;
@@ -86,18 +86,18 @@ try{
     throw "ex2";
   }
   catch(er1){
-    if (er1!=="ex2") $ERROR('#5.1: Exception ==="ex2". Actual:  Exception ==='+ er1  );
+    if (er1!=="ex2") throw new Test262Error('#5.1: Exception ==="ex2". Actual:  Exception ==='+ er1  );
   }
   throw "ex1";
 }
 catch(er1){
-  if (er1!=="ex1") $ERROR('#5.2: Exception ==="ex1". Actual:  Exception ==='+ er1  );
-  if (er1==="ex2") $ERROR('#5.3: Exception !=="ex2". Actual: catch previous embedded exception');
+  if (er1!=="ex1") throw new Test262Error('#5.2: Exception ==="ex1". Actual:  Exception ==='+ er1  );
+  if (er1==="ex2") throw new Test262Error('#5.3: Exception !=="ex2". Actual: catch previous embedded exception');
 }
 finally{
   c5=1;
 }
-if (c5!==1) $ERROR('#5.4: "finally" block must be evaluated');
+if (c5!==1) throw new Test262Error('#5.4: "finally" block must be evaluated');
 
 // CHECK#6
 var c6=0;
@@ -106,13 +106,13 @@ try{
     throw "ex1";
   }
   catch(er1){
-    if (er1!=="ex1") $ERROR('#6.1: Exception ==="ex1". Actual:  Exception ==='+ er1  );
+    if (er1!=="ex1") throw new Test262Error('#6.1: Exception ==="ex1". Actual:  Exception ==='+ er1  );
   }
 }
 finally{
   c6=1;		
 }
-if (c6!==1) $ERROR('#6.2: "finally" block must be evaluated');
+if (c6!==1) throw new Test262Error('#6.2: "finally" block must be evaluated');
 
 // CHECK#7
 var c7=0;
@@ -126,13 +126,13 @@ try{
       throw "ex2";
     }
     catch(er1){
-      if (er1!=="ex2") $ERROR('#7.1: Exception ==="ex2". Actual:  Exception ==='+ er1  );
-      if (er1==="ex1") $ERROR('#7.2: Exception !=="ex1". Actual: catch previous embedded exception');
+      if (er1!=="ex2") throw new Test262Error('#7.1: Exception ==="ex2". Actual:  Exception ==='+ er1  );
+      if (er1==="ex1") throw new Test262Error('#7.2: Exception !=="ex1". Actual: catch previous embedded exception');
       c7++;
     }
   }
 }
 catch(er1){
-  if (er1!=="ex1") $ERROR('#7.3: Exception ==="ex1". Actual:  Exception ==='+ er1  );
+  if (er1!=="ex1") throw new Test262Error('#7.3: Exception ==="ex1". Actual:  Exception ==='+ er1  );
 }
-if (c7!==2) $ERROR('#7.4: "finally" block must be evaluated');
+if (c7!==2) throw new Test262Error('#7.4: "finally" block must be evaluated');
diff --git a/test/language/statements/try/S12.14_A7_T2.js b/test/language/statements/try/S12.14_A7_T2.js
index 9e1e32b1b7..7f20c2d5bc 100644
--- a/test/language/statements/try/S12.14_A7_T2.js
+++ b/test/language/statements/try/S12.14_A7_T2.js
@@ -19,8 +19,8 @@ try{
   }
 }
 catch(er1){
-  if (er1!=="ex1") $ERROR('#1.2: Exception === "ex1". Actual:  Exception ==='+er1 );
-  if (er1==="ex2") $ERROR('#1.3: Exception !== "ex2". Actual: catch previous embedded exception');
+  if (er1!=="ex1") throw new Test262Error('#1.2: Exception === "ex1". Actual:  Exception ==='+er1 );
+  if (er1==="ex2") throw new Test262Error('#1.3: Exception !== "ex2". Actual: catch previous embedded exception');
 }
 
 // CHECK#2
@@ -29,18 +29,18 @@ try{
     throw "ex1";
   }
   catch(er1){
-    if (er1!=="ex1") $ERROR('#2.1: Exception === "ex1". Actual:  Exception ==='+er1 );
+    if (er1!=="ex1") throw new Test262Error('#2.1: Exception === "ex1". Actual:  Exception ==='+er1 );
     try{
       throw "ex2";
     }
     finally{
       throw "ex3";
     }
-    $ERROR('#2.2: throw "ex1" lead to throwing exception');
+    throw new Test262Error('#2.2: throw "ex1" lead to throwing exception');
   }
 }
 catch(er1){
-  if (er1!=="ex3") $ERROR('#2.3: Exception === "ex3". Actual:  Exception ==='+er1 );
+  if (er1!=="ex3") throw new Test262Error('#2.3: Exception === "ex3". Actual:  Exception ==='+er1 );
 }
 
 // CHECK#3
@@ -49,7 +49,7 @@ try{
     throw "ex1";
   }
   catch(er1){
-    if (er1!=="ex1") $ERROR('#3.1: Exception === "ex1". Actual:  Exception ==='+er1 );
+    if (er1!=="ex1") throw new Test262Error('#3.1: Exception === "ex1". Actual:  Exception ==='+er1 );
   }
   finally{
     try{
@@ -61,7 +61,7 @@ try{
   }	
 }
 catch(er1){
-  if (er1!=="ex3") $ERROR('#3.2: Exception === "ex3". Actual:  Exception ==='+er1 );
+  if (er1!=="ex3") throw new Test262Error('#3.2: Exception === "ex3". Actual:  Exception ==='+er1 );
 }
 
 // CHECK#4
@@ -71,7 +71,7 @@ try{
     throw "ex1";
   }
   catch(er1){
-    if (er1!=="ex1") $ERROR('#4.1: Exception === "ex1". Actual:  Exception ==='+er1 );
+    if (er1!=="ex1") throw new Test262Error('#4.1: Exception === "ex1". Actual:  Exception ==='+er1 );
     try{
       throw "ex2";
     }
@@ -84,9 +84,9 @@ try{
   }
 }
 catch(er1){
-  if (er1!=="ex3") $ERROR('#4.2: Exception === "ex3". Actual:  Exception ==='+er1 );
+  if (er1!=="ex3") throw new Test262Error('#4.2: Exception === "ex3". Actual:  Exception ==='+er1 );
 }
-if (c4!==1) $ERROR('#4.3: "finally" block must be evaluated');
+if (c4!==1) throw new Test262Error('#4.3: "finally" block must be evaluated');
 
 // CHECK#5
 var c5=0;
@@ -100,14 +100,14 @@ try{
   throw "ex1";
 }
 catch(er1){
-  if (er1!=="ex3") $ERROR('#5.1: Exception === "ex3". Actual:  Exception ==='+er1 );
-  if (er1==="ex2") $ERROR('#5.2: Exception !== "ex2". Actual: catch previous embedded exception');
-  if (er1==="ex1") $ERROR('#5.3: Exception !=="ex1". Actual: catch previous embedded exception');
+  if (er1!=="ex3") throw new Test262Error('#5.1: Exception === "ex3". Actual:  Exception ==='+er1 );
+  if (er1==="ex2") throw new Test262Error('#5.2: Exception !== "ex2". Actual: catch previous embedded exception');
+  if (er1==="ex1") throw new Test262Error('#5.3: Exception !=="ex1". Actual: catch previous embedded exception');
 }
 finally{
   c5=1;
 }
-if (c5!==1) $ERROR('#5.4: "finally" block must be evaluated');
+if (c5!==1) throw new Test262Error('#5.4: "finally" block must be evaluated');
 
 // CHECK#6
 var c6=0;
@@ -125,9 +125,9 @@ try{
   }
 }
 catch(er1){
-  if (er1!=="ex2") $ERROR('#6.1: Exception === "ex2". Actual:  Exception ==='+er1 );
+  if (er1!=="ex2") throw new Test262Error('#6.1: Exception === "ex2". Actual:  Exception ==='+er1 );
 }
-if (c6!==1) $ERROR('#6.2: "finally" block must be evaluated');
+if (c6!==1) throw new Test262Error('#6.2: "finally" block must be evaluated');
 
 // CHECK#7
 var c7=0;
@@ -147,6 +147,6 @@ try{
   }
 }
 catch(er1){
-  if (er1!=="ex3") $ERROR('#7.1: Exception === "ex3". Actual:  Exception ==='+er1 );
+  if (er1!=="ex3") throw new Test262Error('#7.1: Exception === "ex3". Actual:  Exception ==='+er1 );
 }
-if (c7!==2) $ERROR('#7.2: Embedded "try/finally" blocks must be evaluated');
+if (c7!==2) throw new Test262Error('#7.2: Embedded "try/finally" blocks must be evaluated');
diff --git a/test/language/statements/try/S12.14_A7_T3.js b/test/language/statements/try/S12.14_A7_T3.js
index 43d0d68465..371f92ef8f 100644
--- a/test/language/statements/try/S12.14_A7_T3.js
+++ b/test/language/statements/try/S12.14_A7_T3.js
@@ -15,7 +15,7 @@ try{
     throw "ex2";
   }
   catch(er2){
-    if (er2!=="ex2") $ERROR('#1.1: Exception === "ex2". Actual:  Exception ==='+er2);
+    if (er2!=="ex2") throw new Test262Error('#1.1: Exception === "ex2". Actual:  Exception ==='+er2);
     throw "ex1";
   }
   finally{
@@ -23,9 +23,9 @@ try{
   }
 }
 catch(er1){
-  if (er1!=="ex3") $ERROR('#1.2: Exception === "ex3". Actual:  Exception ==='+er1);
-  if (er1==="ex2") $ERROR('#1.3: Exception !=="ex2". Actual: catch previous catched exception');
-  if (er1==="ex1") $ERROR('#1.4: Exception !=="ex1". Actual: catch previous embedded exception');
+  if (er1!=="ex3") throw new Test262Error('#1.2: Exception === "ex3". Actual:  Exception ==='+er1);
+  if (er1==="ex2") throw new Test262Error('#1.3: Exception !=="ex2". Actual: catch previous catched exception');
+  if (er1==="ex1") throw new Test262Error('#1.4: Exception !=="ex1". Actual: catch previous embedded exception');
 }
 
 // CHECK#2
@@ -38,16 +38,16 @@ catch(er1){
     throw "ex2";
   }
   catch(er1){
-    if (er1==="ex1") $ERROR('#2.1: Exception !=="ex1". Actual: catch previous catched exception');
-    if (er1!=="ex2") $ERROR('#2.2: Exception === "ex2". Actual:  Exception ==='+er1);
+    if (er1==="ex1") throw new Test262Error('#2.1: Exception !=="ex1". Actual: catch previous catched exception');
+    if (er1!=="ex2") throw new Test262Error('#2.2: Exception === "ex2". Actual:  Exception ==='+er1);
   }
   finally{
     c2=1;
   }
-  if (er1!=="ex1") $ERROR('#2.3: Exception === "ex1". Actual:  Exception ==='+er1);
-  if (er1==="ex2") $ERROR('#2.4: Exception !== "ex2". Actual: catch previous embedded exception');
+  if (er1!=="ex1") throw new Test262Error('#2.3: Exception === "ex1". Actual:  Exception ==='+er1);
+  if (er1==="ex2") throw new Test262Error('#2.4: Exception !== "ex2". Actual: catch previous embedded exception');
 }
-if (c2!==1)	$ERROR('#2.5: "finally" block must be evaluated');
+if (c2!==1)	throw new Test262Error('#2.5: "finally" block must be evaluated');
 
 // CHECK#3
 var c3=0;
@@ -55,21 +55,21 @@ try{
   throw "ex1";
 }
 catch(er1){
-  if (er1!=="ex1") $ERROR('#3.1: Exception === "ex1". Actual:  Exception ==='+er1);
+  if (er1!=="ex1") throw new Test262Error('#3.1: Exception === "ex1". Actual:  Exception ==='+er1);
 }
 finally{
   try{
     throw "ex2";
   }
   catch(er1){
-    if (er1==="ex1") $ERROR('#3.2: Exception !=="ex1". Actual: catch previous catched exception');
-    if (er1!=="ex2") $ERROR('#3.3: Exception === "ex2". Actual:  Exception ==='+er1);
+    if (er1==="ex1") throw new Test262Error('#3.2: Exception !=="ex1". Actual: catch previous catched exception');
+    if (er1!=="ex2") throw new Test262Error('#3.3: Exception === "ex2". Actual:  Exception ==='+er1);
   }
   finally{
     c3=1;
   }
 }
-if (c3!==1)	$ERROR('#3.4: "finally" block must be evaluated');
+if (c3!==1)	throw new Test262Error('#3.4: "finally" block must be evaluated');
 
 // CHECK#4
 var c4=0;
@@ -82,23 +82,23 @@ try{
       throw "ex2";
     }
     catch(er1){
-      if (er1==="ex1") $ERROR('#4.1: Exception !=="ex2". Actual: catch previous catched exception');
-      if (er1!=="ex2") $ERROR('#4.2: Exception === "ex2". Actual:  Exception ==='+er1);
+      if (er1==="ex1") throw new Test262Error('#4.1: Exception !=="ex2". Actual: catch previous catched exception');
+      if (er1!=="ex2") throw new Test262Error('#4.2: Exception === "ex2". Actual:  Exception ==='+er1);
     }
     finally{
       c4=2;
       throw "ex3";
     }
-    if (er1!=="ex1") $ERROR('#4.3: Exception === "ex2". Actual:  Exception ==='+er1);
-    if (er1==="ex2") $ERROR('#4.4: Exception !=="ex2". Actual: catch previous catched exception');
-    if (er1==="ex3") $ERROR('#4.5: Exception !=="ex3". Actual: Catch previous embedded exception');
+    if (er1!=="ex1") throw new Test262Error('#4.3: Exception === "ex2". Actual:  Exception ==='+er1);
+    if (er1==="ex2") throw new Test262Error('#4.4: Exception !=="ex2". Actual: catch previous catched exception');
+    if (er1==="ex3") throw new Test262Error('#4.5: Exception !=="ex3". Actual: Catch previous embedded exception');
   }
   finally{
     c4*=2;
   }
 }
 catch(er1){}
-if (c4!==4) $ERROR('#4.6: "finally" block must be evaluated');
+if (c4!==4) throw new Test262Error('#4.6: "finally" block must be evaluated');
 
 // CHECK#5
 var c5=0;
@@ -107,7 +107,7 @@ try{
     throw "ex2";
   }
   catch(er1){
-    if (er1!=="ex2") $ERROR('#5.1: Exception === "ex2". Actual:  Exception ==='+er1);
+    if (er1!=="ex2") throw new Test262Error('#5.1: Exception === "ex2". Actual:  Exception ==='+er1);
   }
   finally{
     throw "ex3";
@@ -115,14 +115,14 @@ try{
   throw "ex1";
 }
 catch(er1){
-  if (er1!=="ex3") $ERROR('#5.2: Exception === "ex3". Actual:  Exception ==='+er1);
-  if (er1==="ex2") $ERROR('#5.3: Exception !=="ex2". Actual: catch previous catched exception');
-  if (er1==="ex1") $ERROR('#5.4: Exception !=="ex1". Actual: catch previous embedded exception');
+  if (er1!=="ex3") throw new Test262Error('#5.2: Exception === "ex3". Actual:  Exception ==='+er1);
+  if (er1==="ex2") throw new Test262Error('#5.3: Exception !=="ex2". Actual: catch previous catched exception');
+  if (er1==="ex1") throw new Test262Error('#5.4: Exception !=="ex1". Actual: catch previous embedded exception');
 }
 finally{
   c5=1;
 }
-if (c5!==1) $ERROR('#5.5: "finally" block must be evaluated');
+if (c5!==1) throw new Test262Error('#5.5: "finally" block must be evaluated');
 
 // CHECK#6
 var c6=0;
@@ -131,7 +131,7 @@ try{
     throw "ex1";
   }
   catch(er1){
-    if (er1!=="ex1") $ERROR('#6.1: Exception === "ex1". Actual:  Exception ==='+er1);
+    if (er1!=="ex1") throw new Test262Error('#6.1: Exception === "ex1". Actual:  Exception ==='+er1);
   }
   finally{
     c6=2;
@@ -140,7 +140,7 @@ try{
 finally{
   c6*=2;
 }
-if (c6!==4) $ERROR('#6.2: "finally" block must be evaluated');
+if (c6!==4) throw new Test262Error('#6.2: "finally" block must be evaluated');
 
 // CHECK#7
 var c7=0;
@@ -154,8 +154,8 @@ try{
       throw "ex2";
     }
     catch(er1){
-      if (er1!=="ex2") $ERROR('#7.1: Exception === "ex2". Actual:  Exception ==='+er1);
-      if (er1==="ex1") $ERROR('#7.2: Exception !=="ex2". Actual: catch previous catched exception');
+      if (er1!=="ex2") throw new Test262Error('#7.1: Exception === "ex2". Actual:  Exception ==='+er1);
+      if (er1==="ex1") throw new Test262Error('#7.2: Exception !=="ex2". Actual: catch previous catched exception');
       c7++;
     }
     finally{
@@ -164,6 +164,6 @@ try{
   }
 }
 catch(er1){
-  if (er1!=="ex1") $ERROR('#7.3: Exception === "ex1". Actual:  Exception ==='+er1);
+  if (er1!=="ex1") throw new Test262Error('#7.3: Exception === "ex1". Actual:  Exception ==='+er1);
 }
-if (c7!==4) $ERROR('#7.4: "finally" block must be evaluated');
+if (c7!==4) throw new Test262Error('#7.4: "finally" block must be evaluated');
diff --git a/test/language/statements/try/S12.14_A8.js b/test/language/statements/try/S12.14_A8.js
index b1c3f39c6b..b52618107a 100644
--- a/test/language/statements/try/S12.14_A8.js
+++ b/test/language/statements/try/S12.14_A8.js
@@ -12,12 +12,12 @@ var c1=1;
 try{
   if(c1===1){
     throw "ex1";
-    $ERROR('#1.1: throw "ex1" lead to throwing exception');
+    throw new Test262Error('#1.1: throw "ex1" lead to throwing exception');
   }
-  $ERROR('#1.2: throw "ex1" inside the "if" statement lead to throwing exception');
+  throw new Test262Error('#1.2: throw "ex1" inside the "if" statement lead to throwing exception');
 }
 catch(er1){	
-  if (er1!=="ex1") $ERROR('#1.3: Exception ==="ex1". Actual:  Exception ==='+er1);
+  if (er1!=="ex1") throw new Test262Error('#1.3: Exception ==="ex1". Actual:  Exception ==='+er1);
 }
 
 // CHECK#2
@@ -25,9 +25,9 @@ var c2=1;
 if(c2===1){
   try{
     throw "ex1";
-    $ERROR('#2.1: throw "ex1" lead to throwing exception');
+    throw new Test262Error('#2.1: throw "ex1" lead to throwing exception');
   }
   catch(er1){
-    if(er1!="ex1") $ERROR('#2.2: Exception ==="ex1". Actual:  Exception ==='+er1);
+    if(er1!="ex1") throw new Test262Error('#2.2: Exception ==="ex1". Actual:  Exception ==='+er1);
   }
 }
diff --git a/test/language/statements/try/S12.14_A9_T1.js b/test/language/statements/try/S12.14_A9_T1.js
index 5515928bec..cb7756c8a3 100644
--- a/test/language/statements/try/S12.14_A9_T1.js
+++ b/test/language/statements/try/S12.14_A9_T1.js
@@ -19,5 +19,5 @@ try{
   while(i<10);
 }
 catch(e){
-  if(e!==5)$ERROR('#1: Exception ===5. Actual:  Exception ==='+ e  );
+  if(e!==5)throw new Test262Error('#1: Exception ===5. Actual:  Exception ==='+ e  );
 }
diff --git a/test/language/statements/try/S12.14_A9_T2.js b/test/language/statements/try/S12.14_A9_T2.js
index 1f97f8fe98..dcf8216e07 100644
--- a/test/language/statements/try/S12.14_A9_T2.js
+++ b/test/language/statements/try/S12.14_A9_T2.js
@@ -26,7 +26,7 @@ do{
 }
 while(c1<2);
 if(fin!==1){
-  $ERROR('#1: "finally" block must be evaluated at "try{continue} catch finally" construction');
+  throw new Test262Error('#1: "finally" block must be evaluated at "try{continue} catch finally" construction');
 }
 
 // CHECK#2
@@ -46,7 +46,7 @@ do{
 }
 while(c2<2);
 if(fin2!==1){
-  $ERROR('#2: "finally" block must be evaluated at "try catch{continue} finally" construction');
+  throw new Test262Error('#2: "finally" block must be evaluated at "try catch{continue} finally" construction');
 }
 
 // CHECK#3
@@ -66,7 +66,7 @@ do{
 }
 while(c3<2);
 if(fin3!==1){
-  $ERROR('#3: "finally" block must be evaluated at "try catch finally{continue}" construction');
+  throw new Test262Error('#3: "finally" block must be evaluated at "try catch finally{continue}" construction');
 }
 
 // CHECK#4
@@ -83,7 +83,7 @@ do{
 }
 while(c4<2);
 if(fin4!==1){
-  $ERROR('#4: "finally" block must be evaluated at "try{continue} finally"  construction');
+  throw new Test262Error('#4: "finally" block must be evaluated at "try{continue} finally"  construction');
 }
 
 // CHECK#5
@@ -99,7 +99,7 @@ do{
 }
 while(c5<2);
 if(c5!==2){
-  $ERROR('#5: "try catch{continue}" must work correctly');
+  throw new Test262Error('#5: "try catch{continue}" must work correctly');
 }
 
 // CHECK#6
@@ -117,8 +117,8 @@ do{
 }
 while(c6<2);
 if(fin6!==1){
-  $ERROR('#6.1: "finally" block must be evaluated');
+  throw new Test262Error('#6.1: "finally" block must be evaluated');
 }
 if(c6!==2){
-  $ERROR('#6.2: "try finally{continue}" must work correctly');
+  throw new Test262Error('#6.2: "try finally{continue}" must work correctly');
 }
diff --git a/test/language/statements/try/S12.14_A9_T3.js b/test/language/statements/try/S12.14_A9_T3.js
index b88cbc9571..f40f20f3b0 100644
--- a/test/language/statements/try/S12.14_A9_T3.js
+++ b/test/language/statements/try/S12.14_A9_T3.js
@@ -27,10 +27,10 @@ do{
 }
 while(c1<2);
 if(fin!==1){
-  $ERROR('#1.1: "finally" block must be evaluated');
+  throw new Test262Error('#1.1: "finally" block must be evaluated');
 }
 if(c1!==1){
-  $ERROR('#1.2: "try{break}catch finally" must work correctly');
+  throw new Test262Error('#1.2: "try{break}catch finally" must work correctly');
 }
 
 // CHECK#2
@@ -51,10 +51,10 @@ do{
 }
 while(c2<2);
 if(fin2!==1){
-  $ERROR('#2.1: "finally" block must be evaluated');
+  throw new Test262Error('#2.1: "finally" block must be evaluated');
 }
 if(c2!==1){
-  $ERROR('#2.2: "try catch{break} finally" must work correctly');
+  throw new Test262Error('#2.2: "try catch{break} finally" must work correctly');
 }
 
 // CHECK#3
@@ -75,10 +75,10 @@ do{
 }
 while(c3<2);
 if(fin3!==1){
-  $ERROR('#3.1: "finally" block must be evaluated');
+  throw new Test262Error('#3.1: "finally" block must be evaluated');
 }
 if(c3!==1){
-  $ERROR('#3.2: "try catch finally{break}" must work correctly');
+  throw new Test262Error('#3.2: "try catch finally{break}" must work correctly');
 }
 
 // CHECK#4
@@ -96,10 +96,10 @@ do{
 }
 while(c4<2);
 if(fin4!==1){
-  $ERROR('#4.1: "finally" block must be evaluated');
+  throw new Test262Error('#4.1: "finally" block must be evaluated');
 }
 if(c4!==1){
-  $ERROR('#4.2: "try{break} finally" must work correctly');
+  throw new Test262Error('#4.2: "try{break} finally" must work correctly');
 }
 
 // CHECK#5
@@ -114,7 +114,7 @@ do{
 }
 while(c5<2);
 if(c5!==0){
-  $ERROR('#5: "try catch{break}" must work correctly');
+  throw new Test262Error('#5: "try catch{break}" must work correctly');
 }
 
 // CHECK#6
@@ -129,7 +129,7 @@ do{
 }
 while(c6<2);
 if(c6!==1){
-  $ERROR('#6: "try{break} catch" must work correctly');
+  throw new Test262Error('#6: "try{break} catch" must work correctly');
 }
 
 // CHECK#7
@@ -153,8 +153,8 @@ catch(ex1){
   c7=10;
 }
 if(fin7!==1){
-  $ERROR('#7.1: "finally" block must be evaluated');
+  throw new Test262Error('#7.1: "finally" block must be evaluated');
 }
 if(c7!==1){
-  $ERROR('#7.2: try finally{break} error');
+  throw new Test262Error('#7.2: try finally{break} error');
 }
diff --git a/test/language/statements/try/S12.14_A9_T4.js b/test/language/statements/try/S12.14_A9_T4.js
index fca88b583f..429aa70c9d 100644
--- a/test/language/statements/try/S12.14_A9_T4.js
+++ b/test/language/statements/try/S12.14_A9_T4.js
@@ -28,10 +28,10 @@ do{
 }
 while(c1<2);
 if(fin!==1){
-  $ERROR('#1.1: "finally" block must be evaluated');
+  throw new Test262Error('#1.1: "finally" block must be evaluated');
 }
 if(c1!==2){
-  $ERROR('#1.2: "try{break} catch finally{continue}" must work correctly');
+  throw new Test262Error('#1.2: "try{break} catch finally{continue}" must work correctly');
 }
 
 // CHECK#2
@@ -53,8 +53,8 @@ do{
 }
 while(c2<2);
 if(fin2!==1){
-  $ERROR('#2.1: "finally" block must be evaluated');
+  throw new Test262Error('#2.1: "finally" block must be evaluated');
 }
 if(c2!==2){
-  $ERROR('#2.2: "try catch{break} finally{continue}" must work correctly');
+  throw new Test262Error('#2.2: "try catch{break} finally{continue}" must work correctly');
 }
diff --git a/test/language/statements/try/S12.14_A9_T5.js b/test/language/statements/try/S12.14_A9_T5.js
index 748cf9cf39..9bb1e7809b 100644
--- a/test/language/statements/try/S12.14_A9_T5.js
+++ b/test/language/statements/try/S12.14_A9_T5.js
@@ -19,18 +19,18 @@ do{
   try{
     if(c===0){
       throw "ex1";
-      $ERROR('#1.1: throw "ex1" lead to throwing exception');
+      throw new Test262Error('#1.1: throw "ex1" lead to throwing exception');
     }
     c+=2;
     if(c===1){
       throw "ex2";
-      $ERROR('#1.2: throw "ex2" lead to throwing exception');
+      throw new Test262Error('#1.2: throw "ex2" lead to throwing exception');
     }
   }
   catch(er1){
     c-=1;
     continue;
-    $ERROR('#1.3: "try catch{continue} finally" must work correctly');
+    throw new Test262Error('#1.3: "try catch{continue} finally" must work correctly');
   }
   finally{
     fin+=1;
@@ -38,5 +38,5 @@ do{
 }
 while(i<10);
 if(fin!==10){
-  $ERROR('#1.4: "finally" block must be evaluated');
+  throw new Test262Error('#1.4: "finally" block must be evaluated');
 }
diff --git a/test/language/statements/variable/S12.2_A1.js b/test/language/statements/variable/S12.2_A1.js
index c54599e35a..5eaf9bd0be 100644
--- a/test/language/statements/variable/S12.2_A1.js
+++ b/test/language/statements/variable/S12.2_A1.js
@@ -17,7 +17,7 @@ try {
     __y = __x ? "good fellow" : "liar"; // __y assigned to "liar" since __x undefined
     __z = __z === __x ? 1 : 0; // __z assigned to 1 since both __x and __z are undefined
 } catch (e) {
-	$ERROR('#1: Using declarated variable before it declaration is admitted');
+	throw new Test262Error('#1: Using declarated variable before it declaration is admitted');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -33,7 +33,7 @@ assert.throws(ReferenceError, function() {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if ((__y !== "liar")&(__z !== 1)) {
-	$ERROR('#3: (__y === "liar") and (__z === 1). Actual:  __y ==='+__y+' and __z ==='+__z  );
+	throw new Test262Error('#3: (__y === "liar") and (__z === 1). Actual:  __y ==='+__y+' and __z ==='+__z  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -43,7 +43,7 @@ var __x, __y = true, __z = __y ? "smeagol" : "golum";
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if (!__y&!(__z = "smeagol")) {
-	$ERROR('#4: A variable with an Initialiser is assigned the value of its AssignmentExpression when the VariableStatement is executed');
+	throw new Test262Error('#4: A variable with an Initialiser is assigned the value of its AssignmentExpression when the VariableStatement is executed');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/variable/S12.2_A10.js b/test/language/statements/variable/S12.2_A10.js
index 7d1440a317..9c8fed3235 100644
--- a/test/language/statements/variable/S12.2_A10.js
+++ b/test/language/statements/variable/S12.2_A10.js
@@ -12,7 +12,7 @@ description: Declaring variable within a "for" IterationStatement
 try {
 	__ind=__ind;
 } catch (e) {
-    $ERROR('#1: var inside "for" is admitted '+e.message);
+    throw new Test262Error('#1: var inside "for" is admitted '+e.message);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/variable/S12.2_A11.js b/test/language/statements/variable/S12.2_A11.js
index 43695c5144..d65f8812ef 100644
--- a/test/language/statements/variable/S12.2_A11.js
+++ b/test/language/statements/variable/S12.2_A11.js
@@ -11,7 +11,7 @@ description: Changing variable value using property attributes
 //CHECK#1
 this['__declared__var'] = "baloon";
 if (this['__declared__var'] !== "baloon") {
-	$ERROR('#1: this[\'__declared__var\'] === "baloon". Actual:  this[\'__declared__var\'] ==='+ this['__declared__var']  );
+	throw new Test262Error('#1: this[\'__declared__var\'] === "baloon". Actual:  this[\'__declared__var\'] ==='+ this['__declared__var']  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -19,7 +19,7 @@ if (this['__declared__var'] !== "baloon") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__declared__var !== "baloon") {
-	$ERROR('#2: __declared__var === "baloon". Actual:  __declared__var ==='+ __declared__var  );
+	throw new Test262Error('#2: __declared__var === "baloon". Actual:  __declared__var ==='+ __declared__var  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/variable/S12.2_A12.js b/test/language/statements/variable/S12.2_A12.js
index ca5de6057d..eb44aa8163 100644
--- a/test/language/statements/variable/S12.2_A12.js
+++ b/test/language/statements/variable/S12.2_A12.js
@@ -12,7 +12,7 @@ description: Declaring variable within "do-while" statement
 try {
 	x=x;
 } catch (e) {
-	$ERROR('#1: Declaration variable inside "do-while" statement is admitted');
+	throw new Test262Error('#1: Declaration variable inside "do-while" statement is admitted');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/variable/S12.2_A2.js b/test/language/statements/variable/S12.2_A2.js
index e6ee613dba..4e80a41e27 100644
--- a/test/language/statements/variable/S12.2_A2.js
+++ b/test/language/statements/variable/S12.2_A2.js
@@ -16,7 +16,7 @@ flags: [noStrict]
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (delete(__variable)) {
-	$ERROR('#1: delete(__variable)===false');
+	throw new Test262Error('#1: delete(__variable)===false');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -24,7 +24,7 @@ if (delete(__variable)) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (delete(this["__variable"])) {
-	$ERROR('#2: delete(this["__variable"])===false');
+	throw new Test262Error('#2: delete(this["__variable"])===false');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -36,7 +36,7 @@ var __variable = "defined";
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (delete(__variable) | delete(this["__variable"])) {
-	$ERROR('#3: (delete(__variable) | delete(this["__variable"]))===false' );
+	throw new Test262Error('#3: (delete(__variable) | delete(this["__variable"]))===false' );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -44,7 +44,7 @@ if (delete(__variable) | delete(this["__variable"])) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if ((__variable !== "defined")|(this["__variable"] !=="defined")) {
-	$ERROR('#4: __variable === "defined" and this["__variable"] ==="defined"');
+	throw new Test262Error('#4: __variable === "defined" and this["__variable"] ==="defined"');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/variable/S12.2_A3.js b/test/language/statements/variable/S12.2_A3.js
index 392a5e9395..c095ba203c 100644
--- a/test/language/statements/variable/S12.2_A3.js
+++ b/test/language/statements/variable/S12.2_A3.js
@@ -16,7 +16,7 @@ var __var = "OUT";
 	//////////////////////////////////////////////////////////////////////////////
 	//CHECK#1
     if (__var !== "INNER_SPACE") {
-    	$ERROR('#1: __var === "INNER_SPACE". Actual:  __var ==='+ __var  );
+    	throw new Test262Error('#1: __var === "INNER_SPACE". Actual:  __var ==='+ __var  );
     }
 	//
 	//////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ var __var = "OUT";
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__var !== "OUT") {
-	$ERROR('#2: __var === "OUT". Actual:  __var ==='+ __var  );
+	throw new Test262Error('#2: __var === "OUT". Actual:  __var ==='+ __var  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -38,7 +38,7 @@ if (__var !== "OUT") {
 	//////////////////////////////////////////////////////////////////////////////
 	//CHECK#3
     if (__var!=="INNERED") {
-    	$ERROR('#3: __var==="INNERED". Actual:  __var==='+ __var );
+    	throw new Test262Error('#3: __var==="INNERED". Actual:  __var==='+ __var );
     }
 	//
 	//////////////////////////////////////////////////////////////////////////////
@@ -47,7 +47,7 @@ if (__var !== "OUT") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if (__var!=="INNERED") {
-	$ERROR('#4: __var==="INNERED". Actual:  __var==='+ __var );
+	throw new Test262Error('#4: __var==="INNERED". Actual:  __var==='+ __var );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/variable/S12.2_A4.js b/test/language/statements/variable/S12.2_A4.js
index a2d23e5c2c..bec9cdd166 100644
--- a/test/language/statements/variable/S12.2_A4.js
+++ b/test/language/statements/variable/S12.2_A4.js
@@ -12,7 +12,7 @@ description: Create and use unicode characters in variable Identifier
 try {
 	__var=__var;
 } catch (e) {
-	$ERROR('#1: Unicode characters in variable Identifier allowed');
+	throw new Test262Error('#1: Unicode characters in variable Identifier allowed');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -22,7 +22,7 @@ var \u005f\u005f\u0076\u0061\u0072 = 1;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__var !== 1) {
-	$ERROR('#2: __var === 1. Actual:  __var ==='+ __var  );
+	throw new Test262Error('#2: __var === 1. Actual:  __var ==='+ __var  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/variable/S12.2_A5.js b/test/language/statements/variable/S12.2_A5.js
index cc9e0dd358..e970760c75 100644
--- a/test/language/statements/variable/S12.2_A5.js
+++ b/test/language/statements/variable/S12.2_A5.js
@@ -25,7 +25,7 @@ eval("var x");
 try{
 	x=x;
 }catch(e){
-	$ERROR('#2: VariableDeclaration inside Eval statement is initialized when program reaches the eval statement '+e.message);
+	throw new Test262Error('#2: VariableDeclaration inside Eval statement is initialized when program reaches the eval statement '+e.message);
 };
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/variable/S12.2_A6_T1.js b/test/language/statements/variable/S12.2_A6_T1.js
index a342cfec9b..282949a532 100644
--- a/test/language/statements/variable/S12.2_A6_T1.js
+++ b/test/language/statements/variable/S12.2_A6_T1.js
@@ -12,7 +12,7 @@ description: Declaring variable within "try-catch" statement
 try{
 	intry__var=intry__var;
 }catch(e){
-	$ERROR('#1: Variable declaration inside "try" block is admitted');
+	throw new Test262Error('#1: Variable declaration inside "try" block is admitted');
 };
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -22,7 +22,7 @@ try{
 try{
 	incatch__var=incatch__var;
 }catch(e){
-	$ERROR('#2: Variable declaration inside "catch" block is admitted');
+	throw new Test262Error('#2: Variable declaration inside "catch" block is admitted');
 };
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/variable/S12.2_A6_T2.js b/test/language/statements/variable/S12.2_A6_T2.js
index 33a9c1cf74..6ef62edd32 100644
--- a/test/language/statements/variable/S12.2_A6_T2.js
+++ b/test/language/statements/variable/S12.2_A6_T2.js
@@ -15,7 +15,7 @@ try{
 	incatch__intry__var=incatch__intry__var;
 	incatch__incatch__var=incatch__incatch__var;
 }catch(e){
-	$ERROR('#1: Variable declaration inside "try-catch" block is admitted');
+	throw new Test262Error('#1: Variable declaration inside "try-catch" block is admitted');
 };
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/variable/S12.2_A7.js b/test/language/statements/variable/S12.2_A7.js
index 1dbc3e6cc3..de31a66db8 100644
--- a/test/language/statements/variable/S12.2_A7.js
+++ b/test/language/statements/variable/S12.2_A7.js
@@ -12,7 +12,7 @@ description: Declaring variable within "for" statement
 try{
 	infor_var = infor_var;
 }catch(e){
-	$ERROR('#1: Variable declaration inside "for" loop is admitted');
+	throw new Test262Error('#1: Variable declaration inside "for" loop is admitted');
 };
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/variable/S12.2_A9.js b/test/language/statements/variable/S12.2_A9.js
index 7db9c3997d..50e22d5abc 100644
--- a/test/language/statements/variable/S12.2_A9.js
+++ b/test/language/statements/variable/S12.2_A9.js
@@ -18,7 +18,7 @@ for (var __prop in this){
         enumed=true;
 }
 if (!(enumed)) {
-	$ERROR('#1: When using property attributes, {DontEnum} not used');
+	throw new Test262Error('#1: When using property attributes, {DontEnum} not used');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/variable/S14_A1.js b/test/language/statements/variable/S14_A1.js
index 2b0cf10d00..80858acd13 100644
--- a/test/language/statements/variable/S14_A1.js
+++ b/test/language/statements/variable/S14_A1.js
@@ -13,7 +13,7 @@ var HERE = "I'm here";
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if ( __func !== undefined) {
-	$ERROR('#1: __func === undefined. Actual:  __func ==='+ __func  );
+	throw new Test262Error('#1: __func === undefined. Actual:  __func ==='+ __func  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -27,7 +27,7 @@ if (true){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__func() !== HERE) {
-	$ERROR('#2: __func() === HERE. Actual:  __func() ==='+ __func()  );
+	throw new Test262Error('#2: __func() === HERE. Actual:  __func() ==='+ __func()  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/while/S12.6.2_A1.js b/test/language/statements/while/S12.6.2_A1.js
index 6555cf3260..7d850c2696 100644
--- a/test/language/statements/while/S12.6.2_A1.js
+++ b/test/language/statements/while/S12.6.2_A1.js
@@ -17,7 +17,7 @@ while ( false ) __in__do=1;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__in__do !== undefined) {
-	$ERROR('#1: false evaluates to false');
+	throw new Test262Error('#1: false evaluates to false');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -27,7 +27,7 @@ while ( 0 ) __in__do=2;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__in__do !== undefined) {
-	$ERROR('#2: 0 evaluates to false');
+	throw new Test262Error('#2: 0 evaluates to false');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -37,7 +37,7 @@ while ( "" ) __in__do=3;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__in__do !== undefined) {
-	$ERROR('#3: empty string evaluates to false');
+	throw new Test262Error('#3: empty string evaluates to false');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -47,7 +47,7 @@ while ( null ) __in__do=4;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if (__in__do !== undefined) {
-	$ERROR('#4: null evaluates to false');
+	throw new Test262Error('#4: null evaluates to false');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -57,7 +57,7 @@ while ( undefined ) __in__do=35;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#5
 if (__in__do !== undefined) {
-	$ERROR('#5: undefined evaluates to false');
+	throw new Test262Error('#5: undefined evaluates to false');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/while/S12.6.2_A10.js b/test/language/statements/while/S12.6.2_A10.js
index dba1eb013d..0538393f0a 100644
--- a/test/language/statements/while/S12.6.2_A10.js
+++ b/test/language/statements/while/S12.6.2_A10.js
@@ -23,7 +23,7 @@ while(function f(){}){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (check !== 1) {
-	$ERROR('#1: FunctionExpression inside while construction expression allowed but function not declare');
+	throw new Test262Error('#1: FunctionExpression inside while construction expression allowed but function not declare');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/while/S12.6.2_A11.js b/test/language/statements/while/S12.6.2_A11.js
index 9063b1fc2b..814f25beb0 100644
--- a/test/language/statements/while/S12.6.2_A11.js
+++ b/test/language/statements/while/S12.6.2_A11.js
@@ -15,7 +15,7 @@ while({}){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__in__do !== 1) {
-	$ERROR('#1: "{}" in while expression evaluates to true');
+	throw new Test262Error('#1: "{}" in while expression evaluates to true');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/while/S12.6.2_A14_T1.js b/test/language/statements/while/S12.6.2_A14_T1.js
index 88ef24773b..0d8a768c16 100644
--- a/test/language/statements/while/S12.6.2_A14_T1.js
+++ b/test/language/statements/while/S12.6.2_A14_T1.js
@@ -19,7 +19,7 @@ while(function __func(){return 0;}){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__reached !== 1) {
-	$ERROR('#2: function expression inside of while expression is allowed');
+	throw new Test262Error('#2: function expression inside of while expression is allowed');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/while/S12.6.2_A14_T2.js b/test/language/statements/while/S12.6.2_A14_T2.js
index 24bc86b247..fb127c4840 100644
--- a/test/language/statements/while/S12.6.2_A14_T2.js
+++ b/test/language/statements/while/S12.6.2_A14_T2.js
@@ -19,7 +19,7 @@ while(function __func(){return 1;}()){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__reached !== 1) {
-	$ERROR('#2: function expression inside of while expression is allowed');
+	throw new Test262Error('#2: function expression inside of while expression is allowed');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/while/S12.6.2_A2.js b/test/language/statements/while/S12.6.2_A2.js
index b177b1cc2e..2b59079c30 100644
--- a/test/language/statements/while/S12.6.2_A2.js
+++ b/test/language/statements/while/S12.6.2_A2.js
@@ -11,17 +11,17 @@ description: Evaluating Statement with error Expression
 
 try {
 	while ((function(){throw 1})()) __in__while = "reached"; 
-	$ERROR('#1: \'while ((function(){throw 1})()) __in__while = "reached"\' lead to throwing exception');
+	throw new Test262Error('#1: \'while ((function(){throw 1})()) __in__while = "reached"\' lead to throwing exception');
 } catch (e) {
 	if (e !== 1) {
-		$ERROR('#1: Exception === 1. Actual:  Exception ==='+e);
+		throw new Test262Error('#1: Exception === 1. Actual:  Exception ==='+e);
 	}
 }
 
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (typeof __in__while !== "undefined") {
-	$ERROR('#1.1: typeof __in__while === "undefined". Actual: typeof __in__while ==='+typeof __in__while);
+	throw new Test262Error('#1.1: typeof __in__while === "undefined". Actual: typeof __in__while ==='+typeof __in__while);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/while/S12.6.2_A3.js b/test/language/statements/while/S12.6.2_A3.js
index 596265aa66..272f663b8a 100644
--- a/test/language/statements/while/S12.6.2_A3.js
+++ b/test/language/statements/while/S12.6.2_A3.js
@@ -16,7 +16,7 @@ __evaluated = eval("while (false) __in__do=1;");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#
 if (__in__do !== undefined) {
-	$ERROR('#1: __in__do === undefined. Actual:  __in__do ==='+ __in__do  );
+	throw new Test262Error('#1: __in__do === undefined. Actual:  __in__do ==='+ __in__do  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -24,7 +24,7 @@ if (__in__do !== undefined) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__evaluated !== undefined) {
-	$ERROR('#2: __evaluated === undefined. Actual:  __evaluated ==='+ __evaluated  );
+	throw new Test262Error('#2: __evaluated === undefined. Actual:  __evaluated ==='+ __evaluated  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/while/S12.6.2_A4_T1.js b/test/language/statements/while/S12.6.2_A4_T1.js
index c86ec1201f..a025e94553 100644
--- a/test/language/statements/while/S12.6.2_A4_T1.js
+++ b/test/language/statements/while/S12.6.2_A4_T1.js
@@ -20,7 +20,7 @@ while(1===1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__in__do__before__break !== "reached") {
-	$ERROR('#1: __in__do__before__break === "reached". Actual:  __in__do__before__break ==='+ __in__do__before__break  );
+	throw new Test262Error('#1: __in__do__before__break === "reached". Actual:  __in__do__before__break ==='+ __in__do__before__break  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -28,7 +28,7 @@ if (__in__do__before__break !== "reached") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (typeof __in__do__after__break !== "undefined") {
-	$ERROR('#2: typeof __in__do__after__break === "undefined". Actual:  typeof __in__do__after__break ==='+ typeof __in__do__after__break  );
+	throw new Test262Error('#2: typeof __in__do__after__break === "undefined". Actual:  typeof __in__do__after__break ==='+ typeof __in__do__after__break  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/while/S12.6.2_A4_T2.js b/test/language/statements/while/S12.6.2_A4_T2.js
index 1cdccd0251..eba01ea897 100644
--- a/test/language/statements/while/S12.6.2_A4_T2.js
+++ b/test/language/statements/while/S12.6.2_A4_T2.js
@@ -23,7 +23,7 @@ do_out : while(1===1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)) {
-	$ERROR('#1: Break inside do-while is allowed as its described at standard');
+	throw new Test262Error('#1: Break inside do-while is allowed as its described at standard');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/while/S12.6.2_A4_T3.js b/test/language/statements/while/S12.6.2_A4_T3.js
index 0134abb6d0..0405816b0a 100644
--- a/test/language/statements/while/S12.6.2_A4_T3.js
+++ b/test/language/statements/while/S12.6.2_A4_T3.js
@@ -23,7 +23,7 @@ do_out : while(1===1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&!__in__do__after__break)) {
-	$ERROR('#1: Break inside do-while is allowed as its described at standard');
+	throw new Test262Error('#1: Break inside do-while is allowed as its described at standard');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/while/S12.6.2_A4_T4.js b/test/language/statements/while/S12.6.2_A4_T4.js
index de588afdfa..aa0ed551b5 100644
--- a/test/language/statements/while/S12.6.2_A4_T4.js
+++ b/test/language/statements/while/S12.6.2_A4_T4.js
@@ -23,7 +23,7 @@ do_out : while(1===1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)) {
-	$ERROR('#1: Break inside do-while is allowed as its described at standard');
+	throw new Test262Error('#1: Break inside do-while is allowed as its described at standard');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/while/S12.6.2_A5.js b/test/language/statements/while/S12.6.2_A5.js
index 51763a9be7..193fe825d1 100644
--- a/test/language/statements/while/S12.6.2_A5.js
+++ b/test/language/statements/while/S12.6.2_A5.js
@@ -16,7 +16,7 @@ __evaluated = eval("while(1) {__in__do__before__break=1; break; __in__do__after_
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__in__do__before__break !== 1) {
-	$ERROR('#1: __in__do__before__break === 1. Actual:  __in__do__before__break ==='+ __in__do__before__break  );
+	throw new Test262Error('#1: __in__do__before__break === 1. Actual:  __in__do__before__break ==='+ __in__do__before__break  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -24,7 +24,7 @@ if (__in__do__before__break !== 1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (typeof __in__do__after__break !== "undefined") {
-	$ERROR('#2: typeof __in__do__after__break === "undefined". Actual:  typeof __in__do__after__break ==='+ typeof __in__do__after__break  );
+	throw new Test262Error('#2: typeof __in__do__after__break === "undefined". Actual:  typeof __in__do__after__break ==='+ typeof __in__do__after__break  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -32,7 +32,7 @@ if (typeof __in__do__after__break !== "undefined") {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (__evaluated !== 1) {
-	$ERROR('#3: __evaluated === 1. Actual:  __evaluated ==='+ __evaluated  );
+	throw new Test262Error('#3: __evaluated === 1. Actual:  __evaluated ==='+ __evaluated  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/while/S12.6.2_A7.js b/test/language/statements/while/S12.6.2_A7.js
index 4853a9861b..9e46bd34bb 100644
--- a/test/language/statements/while/S12.6.2_A7.js
+++ b/test/language/statements/while/S12.6.2_A7.js
@@ -17,7 +17,7 @@ __evaluated = eval("while (__condition<5) eval(\"__condition++\");");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__condition !== 5) {
-	$ERROR('#1: The "while" statement is evaluated as described in the Standard');
+	throw new Test262Error('#1: The "while" statement is evaluated as described in the Standard');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ if (__condition !== 5) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__evaluated !== 4) {
-	$ERROR('#2: The "while" statement returns (normal, V, empty)');
+	throw new Test262Error('#2: The "while" statement returns (normal, V, empty)');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/while/S12.6.2_A8.js b/test/language/statements/while/S12.6.2_A8.js
index af9ab7e39b..c63b84199c 100644
--- a/test/language/statements/while/S12.6.2_A8.js
+++ b/test/language/statements/while/S12.6.2_A8.js
@@ -15,7 +15,7 @@ __evaluated = eval("while(__condition < 10) { __condition++; if (((''+__conditio
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (__odds !== 5) {
-	$ERROR('#1: __odds === 5. Actual:  __odds ==='+ __odds  );
+	throw new Test262Error('#1: __odds === 5. Actual:  __odds ==='+ __odds  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -23,7 +23,7 @@ if (__odds !== 5) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (__evaluated !== 4) {
-	$ERROR('#2: __evaluated === 4. Actual:  __evaluated ==='+ __evaluated  );
+	throw new Test262Error('#2: __evaluated === 4. Actual:  __evaluated ==='+ __evaluated  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/while/S12.6.2_A9.js b/test/language/statements/while/S12.6.2_A9.js
index c051adb819..daca983dff 100644
--- a/test/language/statements/while/S12.6.2_A9.js
+++ b/test/language/statements/while/S12.6.2_A9.js
@@ -14,14 +14,14 @@ try {
 	    var x = 1; 
 	    abaracadabara;
 	};
-	$ERROR('#1: "abbracadabra" lead to throwing exception');
+	throw new Test262Error('#1: "abbracadabra" lead to throwing exception');
 
 } catch (e) {
     if (e instanceof Test262Error) throw e;
 }
 
 if (x !== 1) {
-	$ERROR('#1.1: while statement evaluates as is, without syntax checks');
+	throw new Test262Error('#1.1: while statement evaluates as is, without syntax checks');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/12.10-2-4.js b/test/language/statements/with/12.10-2-4.js
index 88be9f8ac9..bff308cd15 100644
--- a/test/language/statements/with/12.10-2-4.js
+++ b/test/language/statements/with/12.10-2-4.js
@@ -10,10 +10,10 @@ flags: [noStrict]
 
 try{
   with(undefined) x = 2;
-  $ERROR('#2.1: with(undefined) x = 2 must throw TypeError. Actual: x === ' + (x));
+  throw new Test262Error('#2.1: with(undefined) x = 2 must throw TypeError. Actual: x === ' + (x));
 }
 catch(e){
   if((e instanceof TypeError) !== true){
-    $ERROR('#2.2: with(undefined) x = 2 must throw TypeError. Actual: ' + (e));
+    throw new Test262Error('#2.2: with(undefined) x = 2 must throw TypeError. Actual: ' + (e));
   }
 }
diff --git a/test/language/statements/with/12.10-2-5.js b/test/language/statements/with/12.10-2-5.js
index 19637500b5..3305d4b957 100644
--- a/test/language/statements/with/12.10-2-5.js
+++ b/test/language/statements/with/12.10-2-5.js
@@ -10,10 +10,10 @@ flags: [noStrict]
 
 try{
   with(null) x = 2;
-  $ERROR('#2.1: with(null) x = 2 must throw TypeError. Actual: x === . Actual: ' + (x));
+  throw new Test262Error('#2.1: with(null) x = 2 must throw TypeError. Actual: x === . Actual: ' + (x));
 }
 catch(e){
   if((e instanceof TypeError) !== true){
-    $ERROR('#2.2: with(null) x = 2 must throw TypeError. Actual: ' + (e));
+    throw new Test262Error('#2.2: with(null) x = 2 must throw TypeError. Actual: ' + (e));
   }
 }
diff --git a/test/language/statements/with/S12.10_A1.10_T1.js b/test/language/statements/with/S12.10_A1.10_T1.js
index 9f002929dc..14bc869b0e 100644
--- a/test/language/statements/with/S12.10_A1.10_T1.js
+++ b/test/language/statements/with/S12.10_A1.10_T1.js
@@ -64,77 +64,77 @@ with(myObj){
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === "x4")){
-  $ERROR('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.10_T2.js b/test/language/statements/with/S12.10_A1.10_T2.js
index ed8de2ba04..cf0adfc5ad 100644
--- a/test/language/statements/with/S12.10_A1.10_T2.js
+++ b/test/language/statements/with/S12.10_A1.10_T2.js
@@ -69,81 +69,81 @@ try {
 }
 
 if(!(result === "value")){
-  $ERROR('#0: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === "x4")){
-  $ERROR('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.10_T3.js b/test/language/statements/with/S12.10_A1.10_T3.js
index 79498da152..e68e0668ec 100644
--- a/test/language/statements/with/S12.10_A1.10_T3.js
+++ b/test/language/statements/with/S12.10_A1.10_T3.js
@@ -70,83 +70,83 @@ try {
 }
 
 if(!(result === "myObj_value")){
-  $ERROR('#0: result === "myObj_value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "myObj_value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === undefined)){
-  $ERROR('#4: p4 === undefined. Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === undefined. Actual:  p4 ==='+ p4  );
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.10_T4.js b/test/language/statements/with/S12.10_A1.10_T4.js
index cd24c08395..8192abcd1f 100644
--- a/test/language/statements/with/S12.10_A1.10_T4.js
+++ b/test/language/statements/with/S12.10_A1.10_T4.js
@@ -66,77 +66,77 @@ with(myObj){
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === "x4")){
-  $ERROR('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.10_T5.js b/test/language/statements/with/S12.10_A1.10_T5.js
index a58aa95277..bd0ff31a9b 100644
--- a/test/language/statements/with/S12.10_A1.10_T5.js
+++ b/test/language/statements/with/S12.10_A1.10_T5.js
@@ -65,79 +65,79 @@ with(myObj){
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === undefined)){
-  $ERROR('#4: p4 === undefined. Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === undefined. Actual:  p4 ==='+ p4  );
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.11_T1.js b/test/language/statements/with/S12.10_A1.11_T1.js
index b5ebb61f73..48abb43d20 100644
--- a/test/language/statements/with/S12.10_A1.11_T1.js
+++ b/test/language/statements/with/S12.10_A1.11_T1.js
@@ -65,82 +65,82 @@ with(myObj){
 }
 
 if(!(p1 === "x1")){
-  $ERROR('#1: p1 === "x1". Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === "x1". Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 try{
   p3;
-  $ERROR('#3: p3 is nod defined');
+  throw new Test262Error('#3: p3 is nod defined');
 }
 catch(e){
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === parseInt)){
-  $ERROR('#11: st_parseInt === parseInt. Actual:  st_parseInt ==='+ st_parseInt  );
+  throw new Test262Error('#11: st_parseInt === parseInt. Actual:  st_parseInt ==='+ st_parseInt  );
 }
 
 assert.sameValue(st_NaN, NaN, "st_NaN is NaN");
 
 if(!(st_Infinity === Infinity)){
-  $ERROR('#13: st_Infinity === Infinity. Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === Infinity. Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === eval)){
-  $ERROR('#14: st_eval === eval. Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === eval. Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === parseFloat)){
-  $ERROR('#15: st_parseFloat === parseFloat. Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === parseFloat. Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === isNaN)){
-  $ERROR('#16: st_isNaN === isNaN. Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === isNaN. Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === isFinite)){
-  $ERROR('#17: st_isFinite === isFinite. Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === isFinite. Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 try {
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.11_T2.js b/test/language/statements/with/S12.10_A1.11_T2.js
index b05fa6f0f5..473316ebef 100644
--- a/test/language/statements/with/S12.10_A1.11_T2.js
+++ b/test/language/statements/with/S12.10_A1.11_T2.js
@@ -66,86 +66,86 @@ with(myObj){
 }
 
 if(!(result === "value")){
-  $ERROR('#0: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === "x1")){
-  $ERROR('#1: p1 === "x1". Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === "x1". Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 try{
   p3;
-  $ERROR('#3: p3 is nod defined');
+  throw new Test262Error('#3: p3 is nod defined');
 }
 catch(e){
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === parseInt)){
-  $ERROR('#11: st_parseInt === parseInt. Actual:  st_parseInt ==='+ st_parseInt  );
+  throw new Test262Error('#11: st_parseInt === parseInt. Actual:  st_parseInt ==='+ st_parseInt  );
 }
 
 assert.sameValue(st_NaN, NaN, "st_NaN is NaN");
 
 if(!(st_Infinity === Infinity)){
-  $ERROR('#13: st_Infinity === Infinity. Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === Infinity. Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === eval)){
-  $ERROR('#14: st_eval === eval. Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === eval. Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === parseFloat)){
-  $ERROR('#15: st_parseFloat === parseFloat. Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === parseFloat. Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === isNaN)){
-  $ERROR('#16: st_isNaN === isNaN. Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === isNaN. Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === isFinite)){
-  $ERROR('#17: st_isFinite === isFinite. Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === isFinite. Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 try {
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.11_T3.js b/test/language/statements/with/S12.10_A1.11_T3.js
index e87069fb20..c3a954255b 100644
--- a/test/language/statements/with/S12.10_A1.11_T3.js
+++ b/test/language/statements/with/S12.10_A1.11_T3.js
@@ -66,88 +66,88 @@ with(myObj){
 }
 
 if(!(result === undefined)){
-  $ERROR('#0: result === undefined. Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === undefined. Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try{
   p4;
-  $ERROR('#4: p4 doesn\'t exists');
+  throw new Test262Error('#4: p4 doesn\'t exists');
 }
 catch(e){
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 try {
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.11_T4.js b/test/language/statements/with/S12.10_A1.11_T4.js
index 7a34a83da3..c009f9b425 100644
--- a/test/language/statements/with/S12.10_A1.11_T4.js
+++ b/test/language/statements/with/S12.10_A1.11_T4.js
@@ -69,86 +69,86 @@ try {
 }
 
 if(!(result === "value")){
-  $ERROR('#0: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === "x1")){
-  $ERROR('#1: p1 === "x1". Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === "x1". Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 try{
   p3;
-  $ERROR('#3: p3 is nod defined');
+  throw new Test262Error('#3: p3 is nod defined');
 }
 catch(e){
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === parseInt)){
-  $ERROR('#11: st_parseInt === parseInt. Actual:  st_parseInt ==='+ st_parseInt  );
+  throw new Test262Error('#11: st_parseInt === parseInt. Actual:  st_parseInt ==='+ st_parseInt  );
 }
 
 assert.sameValue(st_NaN, NaN, 'st_NaN is NaN');
 
 if(!(st_Infinity === Infinity)){
-  $ERROR('#13: st_Infinity === Infinity. Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === Infinity. Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === eval)){
-  $ERROR('#14: st_eval === eval. Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === eval. Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === parseFloat)){
-  $ERROR('#15: st_parseFloat === parseFloat. Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === parseFloat. Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === isNaN)){
-  $ERROR('#16: st_isNaN === isNaN. Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === isNaN. Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === isFinite)){
-  $ERROR('#17: st_isFinite === isFinite. Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === isFinite. Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 try {
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.11_T5.js b/test/language/statements/with/S12.10_A1.11_T5.js
index 089982d73b..892d7b3e7b 100644
--- a/test/language/statements/with/S12.10_A1.11_T5.js
+++ b/test/language/statements/with/S12.10_A1.11_T5.js
@@ -69,88 +69,88 @@ try {
 }
 
 if(!(result === undefined)){
-  $ERROR('#0: result === undefined. Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === undefined. Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try{
   p4;
-  $ERROR('#4: p4 doesn\'t exists');
+  throw new Test262Error('#4: p4 doesn\'t exists');
 }
 catch(e){
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 try {
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.12_T1.js b/test/language/statements/with/S12.10_A1.12_T1.js
index c257ea77a6..608963f039 100644
--- a/test/language/statements/with/S12.10_A1.12_T1.js
+++ b/test/language/statements/with/S12.10_A1.12_T1.js
@@ -64,82 +64,82 @@ with(myObj){
 f();
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try{
   p4;
-  $ERROR('#4: p4 doesn\'t exists');
+  throw new Test262Error('#4: p4 doesn\'t exists');
 }
 catch(e){
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 try {
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.12_T2.js b/test/language/statements/with/S12.10_A1.12_T2.js
index b68ebb854a..77c268de08 100644
--- a/test/language/statements/with/S12.10_A1.12_T2.js
+++ b/test/language/statements/with/S12.10_A1.12_T2.js
@@ -65,87 +65,87 @@ with(myObj){
 result = f();
 
 if(!(result === "value")){
-  $ERROR('#0: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try{
   p4;
-  $ERROR('#4: p4 doesn\'t exists');
+  throw new Test262Error('#4: p4 doesn\'t exists');
 }
 catch(e){
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.12_T3.js b/test/language/statements/with/S12.10_A1.12_T3.js
index 361ef27615..7dd779b157 100644
--- a/test/language/statements/with/S12.10_A1.12_T3.js
+++ b/test/language/statements/with/S12.10_A1.12_T3.js
@@ -65,88 +65,88 @@ with(myObj){
 result = f();
 
 if(!(result === undefined)){
-  $ERROR('#0: result === undefined. Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === undefined. Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.12_T4.js b/test/language/statements/with/S12.10_A1.12_T4.js
index 9cb0b5f554..94b335e7d4 100644
--- a/test/language/statements/with/S12.10_A1.12_T4.js
+++ b/test/language/statements/with/S12.10_A1.12_T4.js
@@ -69,85 +69,85 @@ try {
 }
 
 if(!(result === "value")){
-  $ERROR('#0: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 try {
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.12_T5.js b/test/language/statements/with/S12.10_A1.12_T5.js
index 4762639300..c69135e2c6 100644
--- a/test/language/statements/with/S12.10_A1.12_T5.js
+++ b/test/language/statements/with/S12.10_A1.12_T5.js
@@ -69,88 +69,88 @@ try {
 }
 
 if(!(result === undefined)){
-  $ERROR('#0: result === undefined. Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === undefined. Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.1_T1.js b/test/language/statements/with/S12.10_A1.1_T1.js
index 70419f009b..a53b827547 100644
--- a/test/language/statements/with/S12.10_A1.1_T1.js
+++ b/test/language/statements/with/S12.10_A1.1_T1.js
@@ -59,77 +59,77 @@ with(myObj){
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === "x4")){
-  $ERROR('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.1_T2.js b/test/language/statements/with/S12.10_A1.1_T2.js
index 1d134e52db..792e1bfad1 100644
--- a/test/language/statements/with/S12.10_A1.1_T2.js
+++ b/test/language/statements/with/S12.10_A1.1_T2.js
@@ -66,81 +66,81 @@ try {
 }
 
 if(!(result === "value")){
-  $ERROR('#0: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === "x4")){
-  $ERROR('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.1_T3.js b/test/language/statements/with/S12.10_A1.1_T3.js
index 36959ff45b..23c44c13dd 100644
--- a/test/language/statements/with/S12.10_A1.1_T3.js
+++ b/test/language/statements/with/S12.10_A1.1_T3.js
@@ -66,83 +66,83 @@ try {
 }
 
 if(!(result === "myObj_value")){
-  $ERROR('#0: result === "myObj_value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "myObj_value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === undefined)){
-  $ERROR('#4: p4 === undefined. Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === undefined. Actual:  p4 ==='+ p4  );
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.2_T1.js b/test/language/statements/with/S12.10_A1.2_T1.js
index c7f7b02e01..4a0bd7a458 100644
--- a/test/language/statements/with/S12.10_A1.2_T1.js
+++ b/test/language/statements/with/S12.10_A1.2_T1.js
@@ -65,82 +65,82 @@ var f = function(){
 f();
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.2_T2.js b/test/language/statements/with/S12.10_A1.2_T2.js
index f7688fb61e..92b66c7bdc 100644
--- a/test/language/statements/with/S12.10_A1.2_T2.js
+++ b/test/language/statements/with/S12.10_A1.2_T2.js
@@ -66,86 +66,86 @@ var f = function(){
 result = f();
 
 if(!(result === "value")){
-  $ERROR('#0: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.2_T3.js b/test/language/statements/with/S12.10_A1.2_T3.js
index 9950bdef3e..04ddca237f 100644
--- a/test/language/statements/with/S12.10_A1.2_T3.js
+++ b/test/language/statements/with/S12.10_A1.2_T3.js
@@ -66,88 +66,88 @@ var f = function(){
 result = f();
 
 if(!(result === "myObj_value")){
-  $ERROR('#0: result === "myObj_value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "myObj_value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.2_T4.js b/test/language/statements/with/S12.10_A1.2_T4.js
index 5d8e7f3668..4735d6fccd 100644
--- a/test/language/statements/with/S12.10_A1.2_T4.js
+++ b/test/language/statements/with/S12.10_A1.2_T4.js
@@ -70,86 +70,86 @@ try {
 }
 
 if(!(result === "value")){
-  $ERROR('#0: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.2_T5.js b/test/language/statements/with/S12.10_A1.2_T5.js
index b9a8c3c787..f4b5e75d02 100644
--- a/test/language/statements/with/S12.10_A1.2_T5.js
+++ b/test/language/statements/with/S12.10_A1.2_T5.js
@@ -70,84 +70,84 @@ try {
 }
 
 if(!(result === "myObj_value")){
-  $ERROR('#0: result === "myObj_value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "myObj_value". Actual:  result ==='+ result  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.3_T1.js b/test/language/statements/with/S12.10_A1.3_T1.js
index dc73379888..1480a282b7 100644
--- a/test/language/statements/with/S12.10_A1.3_T1.js
+++ b/test/language/statements/with/S12.10_A1.3_T1.js
@@ -64,82 +64,82 @@ var f = function(){
 var obj = new f();
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.3_T2.js b/test/language/statements/with/S12.10_A1.3_T2.js
index ab74d1f3cb..23e5399646 100644
--- a/test/language/statements/with/S12.10_A1.3_T2.js
+++ b/test/language/statements/with/S12.10_A1.3_T2.js
@@ -65,82 +65,82 @@ var f = function(){
 var obj = new f();
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.3_T3.js b/test/language/statements/with/S12.10_A1.3_T3.js
index 286ecbf3be..d0264a8e1c 100644
--- a/test/language/statements/with/S12.10_A1.3_T3.js
+++ b/test/language/statements/with/S12.10_A1.3_T3.js
@@ -65,84 +65,84 @@ var f = function(){
 var obj = new f();
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.3_T4.js b/test/language/statements/with/S12.10_A1.3_T4.js
index d030d96070..d7968b1030 100644
--- a/test/language/statements/with/S12.10_A1.3_T4.js
+++ b/test/language/statements/with/S12.10_A1.3_T4.js
@@ -69,82 +69,82 @@ try {
 }
 
 if(!(result === "value")){
-  $ERROR('#0: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.3_T5.js b/test/language/statements/with/S12.10_A1.3_T5.js
index f73c09e2a8..834ac9f28a 100644
--- a/test/language/statements/with/S12.10_A1.3_T5.js
+++ b/test/language/statements/with/S12.10_A1.3_T5.js
@@ -69,88 +69,88 @@ try {
 }
 
 if(!(result === "myObj_value")){
-  $ERROR('#0: result === "myObj_value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "myObj_value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.4_T1.js b/test/language/statements/with/S12.10_A1.4_T1.js
index 472dd2a625..c328a41c75 100644
--- a/test/language/statements/with/S12.10_A1.4_T1.js
+++ b/test/language/statements/with/S12.10_A1.4_T1.js
@@ -64,77 +64,77 @@ do{
 while(false);
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === "x4")){
-  $ERROR('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.4_T2.js b/test/language/statements/with/S12.10_A1.4_T2.js
index 5604f32fda..14f0474c7c 100644
--- a/test/language/statements/with/S12.10_A1.4_T2.js
+++ b/test/language/statements/with/S12.10_A1.4_T2.js
@@ -69,81 +69,81 @@ try {
 }
 
 if(!(result === "value")){
-  $ERROR('#0: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === "x4")){
-  $ERROR('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.4_T3.js b/test/language/statements/with/S12.10_A1.4_T3.js
index 019f16d516..7078982a5a 100644
--- a/test/language/statements/with/S12.10_A1.4_T3.js
+++ b/test/language/statements/with/S12.10_A1.4_T3.js
@@ -69,83 +69,83 @@ try {
 }
 
 if(!(result === "myObj_value")){
-  $ERROR('#0: result === "myObj_value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "myObj_value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === undefined)){
-  $ERROR('#4: p4 === undefined. Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === undefined. Actual:  p4 ==='+ p4  );
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.4_T4.js b/test/language/statements/with/S12.10_A1.4_T4.js
index a782ac09ca..e0a0e0a594 100644
--- a/test/language/statements/with/S12.10_A1.4_T4.js
+++ b/test/language/statements/with/S12.10_A1.4_T4.js
@@ -65,77 +65,77 @@ do{
 while(false);
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === "x4")){
-  $ERROR('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.4_T5.js b/test/language/statements/with/S12.10_A1.4_T5.js
index 5d3f95afc5..9c19fc2a52 100644
--- a/test/language/statements/with/S12.10_A1.4_T5.js
+++ b/test/language/statements/with/S12.10_A1.4_T5.js
@@ -65,79 +65,79 @@ do{
 while(false);
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === undefined)){
-  $ERROR('#4: p4 ===undefined. Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 ===undefined. Actual:  p4 ==='+ p4  );
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.5_T1.js b/test/language/statements/with/S12.10_A1.5_T1.js
index 16effa9f9d..3768b1445c 100644
--- a/test/language/statements/with/S12.10_A1.5_T1.js
+++ b/test/language/statements/with/S12.10_A1.5_T1.js
@@ -69,77 +69,77 @@ for(var prop in myObj){
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === "x4")){
-  $ERROR('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.5_T2.js b/test/language/statements/with/S12.10_A1.5_T2.js
index 545a05b0ec..22237b6f13 100644
--- a/test/language/statements/with/S12.10_A1.5_T2.js
+++ b/test/language/statements/with/S12.10_A1.5_T2.js
@@ -68,81 +68,81 @@ try {
 }
 
 if(!(result === "value")){
-  $ERROR('#0: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === "x4")){
-  $ERROR('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.5_T3.js b/test/language/statements/with/S12.10_A1.5_T3.js
index 9127c79d17..e0de7fa8f8 100644
--- a/test/language/statements/with/S12.10_A1.5_T3.js
+++ b/test/language/statements/with/S12.10_A1.5_T3.js
@@ -74,83 +74,83 @@ try {
 }
 
 if(!(result === "myObj_value")){
-  $ERROR('#0: result === "myObj_value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "myObj_value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === undefined)){
-  $ERROR('#4: p4 === undefined. Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === undefined. Actual:  p4 ==='+ p4  );
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.5_T4.js b/test/language/statements/with/S12.10_A1.5_T4.js
index 0b8317326b..b02742135c 100644
--- a/test/language/statements/with/S12.10_A1.5_T4.js
+++ b/test/language/statements/with/S12.10_A1.5_T4.js
@@ -64,77 +64,77 @@ for(var prop in myObj){
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === "x4")){
-  $ERROR('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.5_T5.js b/test/language/statements/with/S12.10_A1.5_T5.js
index 49e1baf149..6380997639 100644
--- a/test/language/statements/with/S12.10_A1.5_T5.js
+++ b/test/language/statements/with/S12.10_A1.5_T5.js
@@ -70,79 +70,79 @@ for(var prop in myObj){
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === undefined)){
-  $ERROR('#4: p4 === undefined. Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === undefined. Actual:  p4 ==='+ p4  );
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.6_T1.js b/test/language/statements/with/S12.10_A1.6_T1.js
index 91a4d55a2d..9519a7284d 100644
--- a/test/language/statements/with/S12.10_A1.6_T1.js
+++ b/test/language/statements/with/S12.10_A1.6_T1.js
@@ -63,77 +63,77 @@ with(myObj){
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === "x4")){
-  $ERROR('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.6_T2.js b/test/language/statements/with/S12.10_A1.6_T2.js
index b4749d8820..bb8833f587 100644
--- a/test/language/statements/with/S12.10_A1.6_T2.js
+++ b/test/language/statements/with/S12.10_A1.6_T2.js
@@ -68,81 +68,81 @@ try {
 }
 
 if(!(result === "value")){
-  $ERROR('#0: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === "x4")){
-  $ERROR('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.6_T3.js b/test/language/statements/with/S12.10_A1.6_T3.js
index 2fb029bc90..4f6ce68137 100644
--- a/test/language/statements/with/S12.10_A1.6_T3.js
+++ b/test/language/statements/with/S12.10_A1.6_T3.js
@@ -68,83 +68,83 @@ try {
 }
 
 if(!(result === "myObj_value")){
-  $ERROR('#0: result === "myObj_value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "myObj_value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === undefined)){
-  $ERROR('#4: p4 === undefined. Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === undefined. Actual:  p4 ==='+ p4  );
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.7_T1.js b/test/language/statements/with/S12.10_A1.7_T1.js
index c9ce7f4848..4128f9a475 100644
--- a/test/language/statements/with/S12.10_A1.7_T1.js
+++ b/test/language/statements/with/S12.10_A1.7_T1.js
@@ -64,82 +64,82 @@ with(myObj){
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.7_T2.js b/test/language/statements/with/S12.10_A1.7_T2.js
index 6b8738c104..e5181809ef 100644
--- a/test/language/statements/with/S12.10_A1.7_T2.js
+++ b/test/language/statements/with/S12.10_A1.7_T2.js
@@ -65,86 +65,86 @@ with(myObj){
 }
 
 if(!(result === "value")){
-  $ERROR('#0: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.7_T3.js b/test/language/statements/with/S12.10_A1.7_T3.js
index 2e5f1a25ce..f23b46bbc2 100644
--- a/test/language/statements/with/S12.10_A1.7_T3.js
+++ b/test/language/statements/with/S12.10_A1.7_T3.js
@@ -65,88 +65,88 @@ with(myObj){
 }
 
 if(!(result === undefined)){
-  $ERROR('#0: result === undefined. Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === undefined. Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.7_T4.js b/test/language/statements/with/S12.10_A1.7_T4.js
index e6dd66ee2c..d0b44b992b 100644
--- a/test/language/statements/with/S12.10_A1.7_T4.js
+++ b/test/language/statements/with/S12.10_A1.7_T4.js
@@ -69,86 +69,86 @@ try {
 }
 
 if(!(result === "value")){
-  $ERROR('#0: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.7_T5.js b/test/language/statements/with/S12.10_A1.7_T5.js
index 1b28238fb5..8ae426fdf3 100644
--- a/test/language/statements/with/S12.10_A1.7_T5.js
+++ b/test/language/statements/with/S12.10_A1.7_T5.js
@@ -69,88 +69,88 @@ try {
 }
 
 if(!(result === undefined)){
-  $ERROR('#0: result === undefined. Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === undefined. Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.8_T1.js b/test/language/statements/with/S12.10_A1.8_T1.js
index ae87a34431..11393fa1cb 100644
--- a/test/language/statements/with/S12.10_A1.8_T1.js
+++ b/test/language/statements/with/S12.10_A1.8_T1.js
@@ -64,82 +64,82 @@ with(myObj){
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.8_T2.js b/test/language/statements/with/S12.10_A1.8_T2.js
index 95f58eb46c..96186d3fe7 100644
--- a/test/language/statements/with/S12.10_A1.8_T2.js
+++ b/test/language/statements/with/S12.10_A1.8_T2.js
@@ -65,81 +65,81 @@ with(myObj){
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.8_T3.js b/test/language/statements/with/S12.10_A1.8_T3.js
index cf27f09f8b..5606826e97 100644
--- a/test/language/statements/with/S12.10_A1.8_T3.js
+++ b/test/language/statements/with/S12.10_A1.8_T3.js
@@ -65,84 +65,84 @@ with(myObj){
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.8_T4.js b/test/language/statements/with/S12.10_A1.8_T4.js
index 26106fe624..6dcd3cc05a 100644
--- a/test/language/statements/with/S12.10_A1.8_T4.js
+++ b/test/language/statements/with/S12.10_A1.8_T4.js
@@ -69,85 +69,85 @@ try {
 }
 
 if(!(result === "value")){
-  $ERROR('#0: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === "value". Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.8_T5.js b/test/language/statements/with/S12.10_A1.8_T5.js
index a50f7592fb..9d990bffca 100644
--- a/test/language/statements/with/S12.10_A1.8_T5.js
+++ b/test/language/statements/with/S12.10_A1.8_T5.js
@@ -69,88 +69,88 @@ try {
 }
 
 if(!(result === undefined)){
-  $ERROR('#0: result === undefined. Actual:  result ==='+ result  );
+  throw new Test262Error('#0: result === undefined. Actual:  result ==='+ result  );
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 try {
   p4;
-  $ERROR('#4: p4 is not defined');
+  throw new Test262Error('#4: p4 is not defined');
 } catch(e) {    
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 try{
   value;
-  $ERROR('#18: value is not defined');
+  throw new Test262Error('#18: value is not defined');
 }
 catch(e){
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.9_T1.js b/test/language/statements/with/S12.10_A1.9_T1.js
index 679df0c2df..ae67cbabf2 100644
--- a/test/language/statements/with/S12.10_A1.9_T1.js
+++ b/test/language/statements/with/S12.10_A1.9_T1.js
@@ -69,77 +69,77 @@ with(myObj){
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === "x4")){
-  $ERROR('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.9_T2.js b/test/language/statements/with/S12.10_A1.9_T2.js
index 412f8572ad..02cc3f64e9 100644
--- a/test/language/statements/with/S12.10_A1.9_T2.js
+++ b/test/language/statements/with/S12.10_A1.9_T2.js
@@ -64,77 +64,77 @@ with(myObj){
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === "x2")){
-  $ERROR('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === "x2". Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === "x4")){
-  $ERROR('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === "x4". Actual:  p4 ==='+ p4  );
 }
 
 if(!(p5 === "x5")){
-  $ERROR('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
+  throw new Test262Error('#5: p5 === "x5". Actual:  p5 ==='+ p5  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === undefined)){
-  $ERROR('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === undefined. Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt !== parseInt)){
-  $ERROR('#11: myObj.parseInt !== parseInt');
+  throw new Test262Error('#11: myObj.parseInt !== parseInt');
 }
 
 if(!(st_NaN === "obj_NaN")){
-  $ERROR('#12: myObj.NaN !== NaN');
+  throw new Test262Error('#12: myObj.NaN !== NaN');
 }
 
 if(!(st_Infinity !== Infinity)){
-  $ERROR('#13: myObj.Infinity !== Infinity');
+  throw new Test262Error('#13: myObj.Infinity !== Infinity');
 }
 
 if(!(st_eval !== eval)){
-  $ERROR('#14: myObj.eval !== eval');
+  throw new Test262Error('#14: myObj.eval !== eval');
 }
 
 if(!(st_parseFloat !== parseFloat)){
-  $ERROR('#15: myObj.parseFloat !== parseFloat');
+  throw new Test262Error('#15: myObj.parseFloat !== parseFloat');
 }
 
 if(!(st_isNaN !== isNaN)){
-  $ERROR('#16: myObj.isNaN !== isNaN');
+  throw new Test262Error('#16: myObj.isNaN !== isNaN');
 }
 
 if(!(st_isFinite !== isFinite)){
-  $ERROR('#17: myObj.isFinite !== isFinite');
+  throw new Test262Error('#17: myObj.isFinite !== isFinite');
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "value")){
-  $ERROR('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A1.9_T3.js b/test/language/statements/with/S12.10_A1.9_T3.js
index dbf38c81e5..fa161eb853 100644
--- a/test/language/statements/with/S12.10_A1.9_T3.js
+++ b/test/language/statements/with/S12.10_A1.9_T3.js
@@ -70,79 +70,79 @@ with(myObj){
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(p2 === 2)){
-  $ERROR('#2: p2 === 2. Actual:  p2 ==='+ p2  );
+  throw new Test262Error('#2: p2 === 2. Actual:  p2 ==='+ p2  );
 }
 
 if(!(p3 === 3)){
-  $ERROR('#3: p3 === 3. Actual:  p3 ==='+ p3  );
+  throw new Test262Error('#3: p3 === 3. Actual:  p3 ==='+ p3  );
 }
 
 if(!(p4 === undefined)){
-  $ERROR('#4: p4 === undefined. Actual:  p4 ==='+ p4  );
+  throw new Test262Error('#4: p4 === undefined. Actual:  p4 ==='+ p4  );
 }
 
 try {
   p5;
-  $ERROR('#5: p5 is not defined');
+  throw new Test262Error('#5: p5 is not defined');
 } catch(e) {    
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#6: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(myObj.p2 === "b")){
-  $ERROR('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
+  throw new Test262Error('#7: myObj.p2 === "b". Actual:  myObj.p2 ==='+ myObj.p2  );
 }
 
 if(!(myObj.p3 === "c")){
-  $ERROR('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
+  throw new Test262Error('#8: myObj.p3 === "c". Actual:  myObj.p3 ==='+ myObj.p3  );
 }
 
 if(!(myObj.p4 === undefined)){
-  $ERROR('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
+  throw new Test262Error('#9: myObj.p4 === undefined. Actual:  myObj.p4 ==='+ myObj.p4  );
 }
 
 if(!(myObj.p5 === undefined)){
-  $ERROR('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
+  throw new Test262Error('#10: myObj.p5 === undefined. Actual:  myObj.p5 ==='+ myObj.p5  );
 }
 
 if(!(st_parseInt === "parseInt")){
-  $ERROR('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
+  throw new Test262Error('#11: myObj.parseInt === "parseInt". Actual:  myObj.parseInt ==='+ myObj.parseInt  );
 }
 
 if(!(st_NaN === "NaN")){
-  $ERROR('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
+  throw new Test262Error('#12: st_NaN === "NaN". Actual:  st_NaN ==='+ st_NaN  );
 }
 
 if(!(st_Infinity === "Infinity")){
-  $ERROR('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
+  throw new Test262Error('#13: st_Infinity === "Infinity". Actual:  st_Infinity ==='+ st_Infinity  );
 }
 
 if(!(st_eval === "eval")){
-  $ERROR('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
+  throw new Test262Error('#14: st_eval === "eval". Actual:  st_eval ==='+ st_eval  );
 }
 
 if(!(st_parseFloat === "parseFloat")){
-  $ERROR('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
+  throw new Test262Error('#15: st_parseFloat === "parseFloat". Actual:  st_parseFloat ==='+ st_parseFloat  );
 }
 
 if(!(st_isNaN === "isNaN")){
-  $ERROR('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
+  throw new Test262Error('#16: st_isNaN === "isNaN". Actual:  st_isNaN ==='+ st_isNaN  );
 }
 
 if(!(st_isFinite === "isFinite")){
-  $ERROR('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
+  throw new Test262Error('#17: st_isFinite === "isFinite". Actual:  st_isFinite ==='+ st_isFinite  );
 }
 
 if(!(value === undefined)){
-  $ERROR('#18: value === undefined. Actual:  value ==='+ value  );
+  throw new Test262Error('#18: value === undefined. Actual:  value ==='+ value  );
 }
 
 if(!(myObj.value === "myObj_value")){
-  $ERROR('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
+  throw new Test262Error('#19: myObj.value === "myObj_value". Actual:  myObj.value ==='+ myObj.value  );
 }
diff --git a/test/language/statements/with/S12.10_A3.10_T1.js b/test/language/statements/with/S12.10_A3.10_T1.js
index 741f2afd4a..5cf327686d 100644
--- a/test/language/statements/with/S12.10_A3.10_T1.js
+++ b/test/language/statements/with/S12.10_A3.10_T1.js
@@ -31,7 +31,7 @@ with(myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -39,7 +39,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "x1"){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.10_T2.js b/test/language/statements/with/S12.10_A3.10_T2.js
index 9af4a8fcf2..8500a812f5 100644
--- a/test/language/statements/with/S12.10_A3.10_T2.js
+++ b/test/language/statements/with/S12.10_A3.10_T2.js
@@ -36,7 +36,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(result !== 1){
-  $ERROR('#1: result === 1. Actual:  result ==='+ result  );
+  throw new Test262Error('#1: result === 1. Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -44,7 +44,7 @@ if(result !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(p1 !== 1){
-  $ERROR('#2: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#2: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -52,7 +52,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 !== "x1"){
-  $ERROR('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.10_T3.js b/test/language/statements/with/S12.10_A3.10_T3.js
index e00da9010b..a13f50b1e0 100644
--- a/test/language/statements/with/S12.10_A3.10_T3.js
+++ b/test/language/statements/with/S12.10_A3.10_T3.js
@@ -36,7 +36,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(result !== 1){
-  $ERROR('#1: result === 1. Actual:  result ==='+ result  );
+  throw new Test262Error('#1: result === 1. Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -44,7 +44,7 @@ if(result !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(p1 !== 1){
-  $ERROR('#2: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#2: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -52,7 +52,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 !== "a"){
-  $ERROR('#3: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#3: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.10_T4.js b/test/language/statements/with/S12.10_A3.10_T4.js
index ebf5a76311..21f45f0b62 100644
--- a/test/language/statements/with/S12.10_A3.10_T4.js
+++ b/test/language/statements/with/S12.10_A3.10_T4.js
@@ -32,7 +32,7 @@ with(myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -40,7 +40,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "x1"){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.10_T5.js b/test/language/statements/with/S12.10_A3.10_T5.js
index b247c2a77f..b28647acbb 100644
--- a/test/language/statements/with/S12.10_A3.10_T5.js
+++ b/test/language/statements/with/S12.10_A3.10_T5.js
@@ -32,7 +32,7 @@ with(myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -40,7 +40,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "a"){
-  $ERROR('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.11_T1.js b/test/language/statements/with/S12.10_A3.11_T1.js
index ae82b5f463..6cf3688529 100644
--- a/test/language/statements/with/S12.10_A3.11_T1.js
+++ b/test/language/statements/with/S12.10_A3.11_T1.js
@@ -28,9 +28,9 @@ with(myObj){
 }
 
 if(!(p1 === "x1")){
-  $ERROR('#1: p1 === "x1". Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === "x1". Actual:  p1 ==='+ p1  );
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
diff --git a/test/language/statements/with/S12.10_A3.11_T2.js b/test/language/statements/with/S12.10_A3.11_T2.js
index 5bfe96a295..bd5fa0332e 100644
--- a/test/language/statements/with/S12.10_A3.11_T2.js
+++ b/test/language/statements/with/S12.10_A3.11_T2.js
@@ -30,13 +30,13 @@ with(myObj){
 }
 
 if(!(p1 === "x1")){
-  $ERROR('#1: p1 === "x1". Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === "x1". Actual:  p1 ==='+ p1  );
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(result === "value")){
-  $ERROR('#3: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#3: result === "value". Actual:  result ==='+ result  );
 }
diff --git a/test/language/statements/with/S12.10_A3.11_T3.js b/test/language/statements/with/S12.10_A3.11_T3.js
index a7258ebbc6..805948e0d2 100644
--- a/test/language/statements/with/S12.10_A3.11_T3.js
+++ b/test/language/statements/with/S12.10_A3.11_T3.js
@@ -30,13 +30,13 @@ with(myObj){
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(result === "value")){
-  $ERROR('#3: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#3: result === "value". Actual:  result ==='+ result  );
 }
diff --git a/test/language/statements/with/S12.10_A3.11_T4.js b/test/language/statements/with/S12.10_A3.11_T4.js
index 7f0a205b31..43a7ec3ba8 100644
--- a/test/language/statements/with/S12.10_A3.11_T4.js
+++ b/test/language/statements/with/S12.10_A3.11_T4.js
@@ -34,13 +34,13 @@ try {
 }
 
 if(!(p1 === "x1")){
-  $ERROR('#1: p1 === "x1". Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === "x1". Actual:  p1 ==='+ p1  );
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(result === "value")){
-  $ERROR('#3: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#3: result === "value". Actual:  result ==='+ result  );
 }
diff --git a/test/language/statements/with/S12.10_A3.11_T5.js b/test/language/statements/with/S12.10_A3.11_T5.js
index 4bbeb6cbd4..5d94ac3106 100644
--- a/test/language/statements/with/S12.10_A3.11_T5.js
+++ b/test/language/statements/with/S12.10_A3.11_T5.js
@@ -33,13 +33,13 @@ try {
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(result === "value")){
-  $ERROR('#3: result === "value". Actual:  result ==='+ result  );
+  throw new Test262Error('#3: result === "value". Actual:  result ==='+ result  );
 }
diff --git a/test/language/statements/with/S12.10_A3.12_T1.js b/test/language/statements/with/S12.10_A3.12_T1.js
index 3620e6f0a2..dd9a01f64d 100644
--- a/test/language/statements/with/S12.10_A3.12_T1.js
+++ b/test/language/statements/with/S12.10_A3.12_T1.js
@@ -28,9 +28,9 @@ with(myObj){
 f();
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
diff --git a/test/language/statements/with/S12.10_A3.12_T2.js b/test/language/statements/with/S12.10_A3.12_T2.js
index 6fe1fb7fa8..506a7c092c 100644
--- a/test/language/statements/with/S12.10_A3.12_T2.js
+++ b/test/language/statements/with/S12.10_A3.12_T2.js
@@ -30,13 +30,13 @@ with(myObj){
 result = f();
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(result === "myObj_value")){
-  $ERROR('#3: result === "myObj_value". Actual:  result ==='+ result  );
+  throw new Test262Error('#3: result === "myObj_value". Actual:  result ==='+ result  );
 }
diff --git a/test/language/statements/with/S12.10_A3.12_T3.js b/test/language/statements/with/S12.10_A3.12_T3.js
index 2f82789e9d..6d249f5c4f 100644
--- a/test/language/statements/with/S12.10_A3.12_T3.js
+++ b/test/language/statements/with/S12.10_A3.12_T3.js
@@ -29,13 +29,13 @@ with(myObj){
 result = f();
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(result === "myObj_value")){
-  $ERROR('#3: result === "myObj_value". Actual:  result ==='+ result  );
+  throw new Test262Error('#3: result === "myObj_value". Actual:  result ==='+ result  );
 }
diff --git a/test/language/statements/with/S12.10_A3.12_T4.js b/test/language/statements/with/S12.10_A3.12_T4.js
index dc8dbd2746..8976c5bfb7 100644
--- a/test/language/statements/with/S12.10_A3.12_T4.js
+++ b/test/language/statements/with/S12.10_A3.12_T4.js
@@ -33,13 +33,13 @@ try {
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(myObj.p1 === "x1")){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(result === "myObj_value")){
-  $ERROR('#3: result === "myObj_value". Actual:  result ==='+ result  );
+  throw new Test262Error('#3: result === "myObj_value". Actual:  result ==='+ result  );
 }
diff --git a/test/language/statements/with/S12.10_A3.12_T5.js b/test/language/statements/with/S12.10_A3.12_T5.js
index 098f3760a0..96263f71ed 100644
--- a/test/language/statements/with/S12.10_A3.12_T5.js
+++ b/test/language/statements/with/S12.10_A3.12_T5.js
@@ -33,13 +33,13 @@ try {
 }
 
 if(!(p1 === 1)){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 
 if(!(myObj.p1 === "a")){
-  $ERROR('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 
 if(!(result === "myObj_value")){
-  $ERROR('#3: result === "myObj_value". Actual:  result ==='+ result  );
+  throw new Test262Error('#3: result === "myObj_value". Actual:  result ==='+ result  );
 }
diff --git a/test/language/statements/with/S12.10_A3.1_T1.js b/test/language/statements/with/S12.10_A3.1_T1.js
index e85f83a962..6ac37898b0 100644
--- a/test/language/statements/with/S12.10_A3.1_T1.js
+++ b/test/language/statements/with/S12.10_A3.1_T1.js
@@ -28,7 +28,7 @@ with(myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -36,7 +36,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "x1"){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.1_T2.js b/test/language/statements/with/S12.10_A3.1_T2.js
index 7c9ea17f6d..4e98f0dfeb 100644
--- a/test/language/statements/with/S12.10_A3.1_T2.js
+++ b/test/language/statements/with/S12.10_A3.1_T2.js
@@ -37,7 +37,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(result !== 1){
-    $ERROR('#1: result === 1. Actual:  result ==='+ result  );
+    throw new Test262Error('#1: result === 1. Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -46,7 +46,7 @@ if(result !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(p1 !== 1){
-  $ERROR('#2: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#2: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -54,7 +54,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (myObj.p1 !== "x1") {
-	$ERROR('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+	throw new Test262Error('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.1_T3.js b/test/language/statements/with/S12.10_A3.1_T3.js
index 73cd0e88a8..2c2252acc1 100644
--- a/test/language/statements/with/S12.10_A3.1_T3.js
+++ b/test/language/statements/with/S12.10_A3.1_T3.js
@@ -33,7 +33,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(!(result === 1)){
-  $ERROR('#1: result === 1. Actual:  result ==='+ result  );
+  throw new Test262Error('#1: result === 1. Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -41,7 +41,7 @@ if(!(result === 1)){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(!(p1 === 1)){
-  $ERROR('#2: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#2: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -49,7 +49,7 @@ if(!(p1 === 1)){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(!(myObj.p1 === "a")){
-  $ERROR('#3: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#3: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.2_T1.js b/test/language/statements/with/S12.10_A3.2_T1.js
index 653187d352..9c41772a9d 100644
--- a/test/language/statements/with/S12.10_A3.2_T1.js
+++ b/test/language/statements/with/S12.10_A3.2_T1.js
@@ -33,7 +33,7 @@ f();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -41,7 +41,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "x1"){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.2_T2.js b/test/language/statements/with/S12.10_A3.2_T2.js
index 17de0c8b31..120cd879e1 100644
--- a/test/language/statements/with/S12.10_A3.2_T2.js
+++ b/test/language/statements/with/S12.10_A3.2_T2.js
@@ -34,7 +34,7 @@ f();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-    $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+    throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -42,7 +42,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(myObj.p1 !== "x1"){
-    $ERROR('#1: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+    throw new Test262Error('#1: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.2_T3.js b/test/language/statements/with/S12.10_A3.2_T3.js
index 55aba9044d..3330716e78 100644
--- a/test/language/statements/with/S12.10_A3.2_T3.js
+++ b/test/language/statements/with/S12.10_A3.2_T3.js
@@ -34,7 +34,7 @@ f();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -42,7 +42,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "a"){
-  $ERROR('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.2_T4.js b/test/language/statements/with/S12.10_A3.2_T4.js
index f0ede6f878..af0e597983 100644
--- a/test/language/statements/with/S12.10_A3.2_T4.js
+++ b/test/language/statements/with/S12.10_A3.2_T4.js
@@ -39,7 +39,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(result !== 1){
-  $ERROR('#1: result === 1. Actual:  result ==='+ result  );
+  throw new Test262Error('#1: result === 1. Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -47,7 +47,7 @@ if(result !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(p1 !== 1){
-  $ERROR('#2: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#2: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -55,7 +55,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 !== "x1"){
-  $ERROR('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.2_T5.js b/test/language/statements/with/S12.10_A3.2_T5.js
index 31f4f4d637..6da1e21184 100644
--- a/test/language/statements/with/S12.10_A3.2_T5.js
+++ b/test/language/statements/with/S12.10_A3.2_T5.js
@@ -38,7 +38,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(result !== 1){
-  $ERROR('#1: result === 1. Actual:  result ==='+ result  );
+  throw new Test262Error('#1: result === 1. Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -46,7 +46,7 @@ if(result !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(p1 !== 1){
-  $ERROR('#2: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#2: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -54,7 +54,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 !== "a"){
-  $ERROR('#3: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#3: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.3_T1.js b/test/language/statements/with/S12.10_A3.3_T1.js
index ba9e54c7a0..f0523cf82b 100644
--- a/test/language/statements/with/S12.10_A3.3_T1.js
+++ b/test/language/statements/with/S12.10_A3.3_T1.js
@@ -33,7 +33,7 @@ var obj = new __FACTORY();
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -41,7 +41,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "x1"){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.3_T2.js b/test/language/statements/with/S12.10_A3.3_T2.js
index e783f3729f..a0fba008c0 100644
--- a/test/language/statements/with/S12.10_A3.3_T2.js
+++ b/test/language/statements/with/S12.10_A3.3_T2.js
@@ -34,7 +34,7 @@ var obj = new __FACTORY;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -42,7 +42,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "x1"){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.3_T3.js b/test/language/statements/with/S12.10_A3.3_T3.js
index 05f9abad73..a0f6fb5be5 100644
--- a/test/language/statements/with/S12.10_A3.3_T3.js
+++ b/test/language/statements/with/S12.10_A3.3_T3.js
@@ -34,7 +34,7 @@ var obj = new __FACTORY;
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -42,7 +42,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "a"){
-  $ERROR('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.3_T4.js b/test/language/statements/with/S12.10_A3.3_T4.js
index 2e23384adb..2fd397d25b 100644
--- a/test/language/statements/with/S12.10_A3.3_T4.js
+++ b/test/language/statements/with/S12.10_A3.3_T4.js
@@ -38,7 +38,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if (result !== 1) {
-  $ERROR('#1: result === 1. Actual:  result ==='+ result  );
+  throw new Test262Error('#1: result === 1. Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -46,7 +46,7 @@ if (result !== 1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if (p1 !== 1) {
-  $ERROR('#2: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#2: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -54,7 +54,7 @@ if (p1 !== 1) {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if (myObj.p1 !== "x1") {
-  $ERROR('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.4_T1.js b/test/language/statements/with/S12.10_A3.4_T1.js
index 88355b2480..bb0050f4b9 100644
--- a/test/language/statements/with/S12.10_A3.4_T1.js
+++ b/test/language/statements/with/S12.10_A3.4_T1.js
@@ -31,7 +31,7 @@ do {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -39,7 +39,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "x1"){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.4_T2.js b/test/language/statements/with/S12.10_A3.4_T2.js
index 7039417581..ec509b7c2d 100644
--- a/test/language/statements/with/S12.10_A3.4_T2.js
+++ b/test/language/statements/with/S12.10_A3.4_T2.js
@@ -36,7 +36,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(result !== 1){
-  $ERROR('#1: result === 1. Actual:  result ==='+ result  );
+  throw new Test262Error('#1: result === 1. Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -44,7 +44,7 @@ if(result !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(p1 !== 1){
-  $ERROR('#2: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#2: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -52,7 +52,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 !== "x1"){
-  $ERROR('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.4_T3.js b/test/language/statements/with/S12.10_A3.4_T3.js
index 826a97d789..c3e5b74749 100644
--- a/test/language/statements/with/S12.10_A3.4_T3.js
+++ b/test/language/statements/with/S12.10_A3.4_T3.js
@@ -36,7 +36,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(result !== 1){
-  $ERROR('#1: result === 1. Actual:  result ==='+ result  );
+  throw new Test262Error('#1: result === 1. Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -44,7 +44,7 @@ if(result !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(p1 !== 1){
-  $ERROR('#2: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#2: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -52,7 +52,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 !== "a"){
-  $ERROR('#3: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#3: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.4_T4.js b/test/language/statements/with/S12.10_A3.4_T4.js
index b71f5eafd4..90103cecd8 100644
--- a/test/language/statements/with/S12.10_A3.4_T4.js
+++ b/test/language/statements/with/S12.10_A3.4_T4.js
@@ -32,7 +32,7 @@ do {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -40,7 +40,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "x1"){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.4_T5.js b/test/language/statements/with/S12.10_A3.4_T5.js
index 5f3b3de6b1..72771e6549 100644
--- a/test/language/statements/with/S12.10_A3.4_T5.js
+++ b/test/language/statements/with/S12.10_A3.4_T5.js
@@ -32,7 +32,7 @@ do {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -40,7 +40,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "a"){
-  $ERROR('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.5_T1.js b/test/language/statements/with/S12.10_A3.5_T1.js
index 49c3a75d92..be35b4569e 100644
--- a/test/language/statements/with/S12.10_A3.5_T1.js
+++ b/test/language/statements/with/S12.10_A3.5_T1.js
@@ -31,7 +31,7 @@ for(var prop in myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -39,7 +39,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "x1"){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.5_T2.js b/test/language/statements/with/S12.10_A3.5_T2.js
index 570a1a6ce7..b88b0619f3 100644
--- a/test/language/statements/with/S12.10_A3.5_T2.js
+++ b/test/language/statements/with/S12.10_A3.5_T2.js
@@ -36,7 +36,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(result !== 1){
-  $ERROR('#1: result === 1. Actual:  result ==='+ result  );
+  throw new Test262Error('#1: result === 1. Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -44,7 +44,7 @@ if(result !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(p1 !== 1){
-  $ERROR('#2: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#2: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -52,7 +52,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 !== "x1"){
-  $ERROR('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.5_T3.js b/test/language/statements/with/S12.10_A3.5_T3.js
index dbbaea3ae0..7292343605 100644
--- a/test/language/statements/with/S12.10_A3.5_T3.js
+++ b/test/language/statements/with/S12.10_A3.5_T3.js
@@ -36,7 +36,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(result !== 1){
-  $ERROR('#1: result === 1. Actual:  result ==='+ result  );
+  throw new Test262Error('#1: result === 1. Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -44,7 +44,7 @@ if(result !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(p1 !== 1){
-  $ERROR('#2: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#2: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -52,7 +52,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 !== "a"){
-  $ERROR('#3: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#3: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.5_T4.js b/test/language/statements/with/S12.10_A3.5_T4.js
index 67168a5821..8a42b5a272 100644
--- a/test/language/statements/with/S12.10_A3.5_T4.js
+++ b/test/language/statements/with/S12.10_A3.5_T4.js
@@ -32,7 +32,7 @@ for(var prop in myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -40,7 +40,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "x1"){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.5_T5.js b/test/language/statements/with/S12.10_A3.5_T5.js
index 51ce8b50d7..a9f3a0a4b4 100644
--- a/test/language/statements/with/S12.10_A3.5_T5.js
+++ b/test/language/statements/with/S12.10_A3.5_T5.js
@@ -32,7 +32,7 @@ for(var prop in myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -40,7 +40,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(myObj.p1 !== "a"){
-  $ERROR('#1: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#1: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.6_T1.js b/test/language/statements/with/S12.10_A3.6_T1.js
index dc69ff4141..15436d5cc7 100644
--- a/test/language/statements/with/S12.10_A3.6_T1.js
+++ b/test/language/statements/with/S12.10_A3.6_T1.js
@@ -37,7 +37,7 @@ with(myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -45,7 +45,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "a"){
-  $ERROR('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -53,7 +53,7 @@ if(myObj.p1 !== "a"){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(theirObj.p1 !== "x1"){
-  $ERROR('#3: theirObj.p1 === "x1". Actual:  theirObj.p1 ==='+ theirObj.p1  );
+  throw new Test262Error('#3: theirObj.p1 === "x1". Actual:  theirObj.p1 ==='+ theirObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.6_T2.js b/test/language/statements/with/S12.10_A3.6_T2.js
index 35399db092..276359832b 100644
--- a/test/language/statements/with/S12.10_A3.6_T2.js
+++ b/test/language/statements/with/S12.10_A3.6_T2.js
@@ -43,7 +43,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -51,7 +51,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "a"){
-  $ERROR('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -59,7 +59,7 @@ if(myObj.p1 !== "a"){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(theirObj.p1 !== "x1"){
-  $ERROR('#3: theirObj.p1 === "x1". Actual:  theirObj.p1 ==='+ theirObj.p1  );
+  throw new Test262Error('#3: theirObj.p1 === "x1". Actual:  theirObj.p1 ==='+ theirObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.6_T3.js b/test/language/statements/with/S12.10_A3.6_T3.js
index 2d1aa0ca17..3a506bc1d5 100644
--- a/test/language/statements/with/S12.10_A3.6_T3.js
+++ b/test/language/statements/with/S12.10_A3.6_T3.js
@@ -44,7 +44,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -52,7 +52,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "a"){
-  $ERROR('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -60,7 +60,7 @@ if(myObj.p1 !== "a"){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(theirObj.p1 !== true){
-  $ERROR('#3: theirObj.p1 === true. Actual:  theirObj.p1 ==='+ theirObj.p1  );
+  throw new Test262Error('#3: theirObj.p1 === true. Actual:  theirObj.p1 ==='+ theirObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.7_T1.js b/test/language/statements/with/S12.10_A3.7_T1.js
index 0674864f7b..e3a27da3bf 100644
--- a/test/language/statements/with/S12.10_A3.7_T1.js
+++ b/test/language/statements/with/S12.10_A3.7_T1.js
@@ -31,7 +31,7 @@ with(myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -39,7 +39,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "x1"){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.7_T2.js b/test/language/statements/with/S12.10_A3.7_T2.js
index 46c5c3eeb7..d3a520575b 100644
--- a/test/language/statements/with/S12.10_A3.7_T2.js
+++ b/test/language/statements/with/S12.10_A3.7_T2.js
@@ -32,7 +32,7 @@ with(myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -40,7 +40,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(result !== "myObj_value"){
-  $ERROR('#2: result === "myObj_value". Actual:  result ==='+ result  );
+  throw new Test262Error('#2: result === "myObj_value". Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -48,7 +48,7 @@ if(result !== "myObj_value"){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 !== "x1"){
-  $ERROR('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.7_T3.js b/test/language/statements/with/S12.10_A3.7_T3.js
index 07a5c8d805..222bdcf997 100644
--- a/test/language/statements/with/S12.10_A3.7_T3.js
+++ b/test/language/statements/with/S12.10_A3.7_T3.js
@@ -32,7 +32,7 @@ with(myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -40,7 +40,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(result !== 'myObj_value'){
-  $ERROR('#2: result === \'myObj_value\'. Actual:  result ==='+ result  );
+  throw new Test262Error('#2: result === \'myObj_value\'. Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -48,7 +48,7 @@ if(result !== 'myObj_value'){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 !== "a"){
-  $ERROR('#3: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#3: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.7_T4.js b/test/language/statements/with/S12.10_A3.7_T4.js
index a06dacd042..5cfdc7310e 100644
--- a/test/language/statements/with/S12.10_A3.7_T4.js
+++ b/test/language/statements/with/S12.10_A3.7_T4.js
@@ -36,7 +36,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(result !== 1){
-  $ERROR('#1: result === 1. Actual:  result ==='+ result  );
+  throw new Test262Error('#1: result === 1. Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -44,7 +44,7 @@ if(result !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(p1 !== 1){
-  $ERROR('#2: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#2: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -52,7 +52,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 !== "x1"){
-  $ERROR('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.7_T5.js b/test/language/statements/with/S12.10_A3.7_T5.js
index 9322d83868..be9ce0c531 100644
--- a/test/language/statements/with/S12.10_A3.7_T5.js
+++ b/test/language/statements/with/S12.10_A3.7_T5.js
@@ -36,7 +36,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(result !== 1){
-  $ERROR('#1: result === 1. Actual:  result ==='+ result  );
+  throw new Test262Error('#1: result === 1. Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -44,7 +44,7 @@ if(result !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(p1 !== 1){
-  $ERROR('#2: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#2: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -52,7 +52,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 !== "a"){
-  $ERROR('#3: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#3: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.8_T1.js b/test/language/statements/with/S12.10_A3.8_T1.js
index 3835fb3ee7..4f0c907dad 100644
--- a/test/language/statements/with/S12.10_A3.8_T1.js
+++ b/test/language/statements/with/S12.10_A3.8_T1.js
@@ -32,7 +32,7 @@ with(myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -40,7 +40,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "x1"){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.8_T2.js b/test/language/statements/with/S12.10_A3.8_T2.js
index 69f82697cc..dab5ef48e4 100644
--- a/test/language/statements/with/S12.10_A3.8_T2.js
+++ b/test/language/statements/with/S12.10_A3.8_T2.js
@@ -33,7 +33,7 @@ with(myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -41,7 +41,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "x1"){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.8_T3.js b/test/language/statements/with/S12.10_A3.8_T3.js
index 50cc0bf9c7..1b64262a52 100644
--- a/test/language/statements/with/S12.10_A3.8_T3.js
+++ b/test/language/statements/with/S12.10_A3.8_T3.js
@@ -33,7 +33,7 @@ with(myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -41,7 +41,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "a"){
-  $ERROR('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.8_T4.js b/test/language/statements/with/S12.10_A3.8_T4.js
index f14305e7bf..7156992c2b 100644
--- a/test/language/statements/with/S12.10_A3.8_T4.js
+++ b/test/language/statements/with/S12.10_A3.8_T4.js
@@ -37,7 +37,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(result !== 1){
-  $ERROR('#1: result === 1. Actual:  result ==='+ result  );
+  throw new Test262Error('#1: result === 1. Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -45,7 +45,7 @@ if(result !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(p1 !== 1){
-  $ERROR('#2: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#2: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -53,7 +53,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 !== "x1"){
-  $ERROR('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#3: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.8_T5.js b/test/language/statements/with/S12.10_A3.8_T5.js
index 4b763c6161..5ec0e1995f 100644
--- a/test/language/statements/with/S12.10_A3.8_T5.js
+++ b/test/language/statements/with/S12.10_A3.8_T5.js
@@ -37,7 +37,7 @@ try {
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(result !== 1){
-  $ERROR('#1: result === 1. Actual:  result ==='+ result  );
+  throw new Test262Error('#1: result === 1. Actual:  result ==='+ result  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -45,7 +45,7 @@ if(result !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(p1 !== 1){
-  $ERROR('#2: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#2: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -53,7 +53,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 !== "a"){
-  $ERROR('#3: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#3: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.9_T1.js b/test/language/statements/with/S12.10_A3.9_T1.js
index f889a29a0d..e1e3cae1c5 100644
--- a/test/language/statements/with/S12.10_A3.9_T1.js
+++ b/test/language/statements/with/S12.10_A3.9_T1.js
@@ -31,7 +31,7 @@ with(myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -39,7 +39,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "x1"){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.9_T2.js b/test/language/statements/with/S12.10_A3.9_T2.js
index 80957f1df2..bbf60eda2c 100644
--- a/test/language/statements/with/S12.10_A3.9_T2.js
+++ b/test/language/statements/with/S12.10_A3.9_T2.js
@@ -32,7 +32,7 @@ with(myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -40,7 +40,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "x1"){
-  $ERROR('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "x1". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A3.9_T3.js b/test/language/statements/with/S12.10_A3.9_T3.js
index 3d508f4475..1fdb302ea8 100644
--- a/test/language/statements/with/S12.10_A3.9_T3.js
+++ b/test/language/statements/with/S12.10_A3.9_T3.js
@@ -32,7 +32,7 @@ with(myObj){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(p1 !== 1){
-  $ERROR('#1: p1 === 1. Actual:  p1 ==='+ p1  );
+  throw new Test262Error('#1: p1 === 1. Actual:  p1 ==='+ p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -40,7 +40,7 @@ if(p1 !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== "a"){
-  $ERROR('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === "a". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A4_T1.js b/test/language/statements/with/S12.10_A4_T1.js
index a475f0c7ba..1ccb815595 100644
--- a/test/language/statements/with/S12.10_A4_T1.js
+++ b/test/language/statements/with/S12.10_A4_T1.js
@@ -17,7 +17,7 @@ eval("with(myObj){p1='b'}");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(myObj.p1 !== 'b'){
-  $ERROR('#1: myObj.p1 === "b". Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#1: myObj.p1 === "b". Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ if(myObj.p1 !== 'b'){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 === 1){
-  $ERROR('#2: myObj.p1 !== 1');
+  throw new Test262Error('#2: myObj.p1 !== 1');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A4_T2.js b/test/language/statements/with/S12.10_A4_T2.js
index b4bc9e3a90..54a8652e25 100644
--- a/test/language/statements/with/S12.10_A4_T2.js
+++ b/test/language/statements/with/S12.10_A4_T2.js
@@ -17,7 +17,7 @@ eval("with(myObj){p1=2}");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(myObj.p1 !== 2){
-  $ERROR('#1: myObj.p1 === 2. Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#1: myObj.p1 === 2. Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ if(myObj.p1 !== 2){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 === 'a'){
-  $ERROR('#2: myObj.p1 !== \'a\'');
+  throw new Test262Error('#2: myObj.p1 !== \'a\'');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A4_T3.js b/test/language/statements/with/S12.10_A4_T3.js
index 1c0baade80..c5d989b48e 100644
--- a/test/language/statements/with/S12.10_A4_T3.js
+++ b/test/language/statements/with/S12.10_A4_T3.js
@@ -17,7 +17,7 @@ eval("with(myObj){p1=false}");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(myObj.p1 !== false){
-  $ERROR('#1: myObj.p1 === false. Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#1: myObj.p1 === false. Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ if(myObj.p1 !== false){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 === 'a'){
-  $ERROR('#2: myObj.p1 !== \'a\'');
+  throw new Test262Error('#2: myObj.p1 !== \'a\'');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A4_T4.js b/test/language/statements/with/S12.10_A4_T4.js
index 04bc797d61..46871d712a 100644
--- a/test/language/statements/with/S12.10_A4_T4.js
+++ b/test/language/statements/with/S12.10_A4_T4.js
@@ -17,7 +17,7 @@ eval("with(myObj){p1={b:'hi'}}");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(myObj.p1.a === "hello"){
-  $ERROR('#1: myObj.p1.a !== "hello"');
+  throw new Test262Error('#1: myObj.p1.a !== "hello"');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ if(myObj.p1.a === "hello"){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1.b !== "hi"){
-  $ERROR('#2: myObj.p1.b === "hi". Actual:  myObj.p1.b ==='+ myObj.p1.b  );
+  throw new Test262Error('#2: myObj.p1.b === "hi". Actual:  myObj.p1.b ==='+ myObj.p1.b  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -34,7 +34,7 @@ if(myObj.p1.b !== "hi"){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 === 'a'){
-  $ERROR('#3: myObj.p1 !== \'a\'');
+  throw new Test262Error('#3: myObj.p1 !== \'a\'');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A4_T5.js b/test/language/statements/with/S12.10_A4_T5.js
index 4bb306fc0b..a4c8c52f82 100644
--- a/test/language/statements/with/S12.10_A4_T5.js
+++ b/test/language/statements/with/S12.10_A4_T5.js
@@ -17,7 +17,7 @@ eval("with(myObj){p1=[3,2,1]}");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(myObj.p1[2] !== 1){
-  $ERROR('#1: myObj.p1[2] === 1. Actual:  myObj.p1[2] ==='+ myObj.p1[2]  );
+  throw new Test262Error('#1: myObj.p1[2] === 1. Actual:  myObj.p1[2] ==='+ myObj.p1[2]  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ if(myObj.p1[2] !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 === 'a'){
-  $ERROR('#2: myObj.p1 !== \'a\'');
+  throw new Test262Error('#2: myObj.p1 !== \'a\'');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A4_T6.js b/test/language/statements/with/S12.10_A4_T6.js
index 56f52e092e..1680ce8ac0 100644
--- a/test/language/statements/with/S12.10_A4_T6.js
+++ b/test/language/statements/with/S12.10_A4_T6.js
@@ -17,7 +17,7 @@ eval("with(myObj){p1=function(){return 1;}}");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(myObj.p1() !== 1){
-  $ERROR('#1: myObj.p1 === 1. Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#1: myObj.p1 === 1. Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -25,7 +25,7 @@ if(myObj.p1() !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.p1 === 'a'){
-  $ERROR('#2: myObj.p1 !== \'a\'');
+  throw new Test262Error('#2: myObj.p1 !== \'a\'');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A5_T1.js b/test/language/statements/with/S12.10_A5_T1.js
index 4d46db2dec..9662224395 100644
--- a/test/language/statements/with/S12.10_A5_T1.js
+++ b/test/language/statements/with/S12.10_A5_T1.js
@@ -18,7 +18,7 @@ eval("with(myObj){del = delete p1}");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(myObj.p1 === 'a'){
-  $ERROR('#1: myObj.p1 !== "a"');
+  throw new Test262Error('#1: myObj.p1 !== "a"');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -26,7 +26,7 @@ if(myObj.p1 === 'a'){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== undefined){
-  $ERROR('#2: myObj.p1 === undefined. Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === undefined. Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -34,7 +34,7 @@ if(myObj.p1 !== undefined){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.del !== true){
-  $ERROR('#3: myObj.del === true. Actual:  myObj.del ==='+ myObj.del  );
+  throw new Test262Error('#3: myObj.del === true. Actual:  myObj.del ==='+ myObj.del  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -42,7 +42,7 @@ if(myObj.del !== true){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if(myObj.p1 === 1){
-  $ERROR('#4: myObj.p1 !== 1');
+  throw new Test262Error('#4: myObj.p1 !== 1');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A5_T2.js b/test/language/statements/with/S12.10_A5_T2.js
index 01caf1453d..55ed58c95b 100644
--- a/test/language/statements/with/S12.10_A5_T2.js
+++ b/test/language/statements/with/S12.10_A5_T2.js
@@ -18,7 +18,7 @@ eval("with(myObj){del = delete p1}");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(myObj.p1 === 1){
-  $ERROR('#1: myObj.p1 !== 1');
+  throw new Test262Error('#1: myObj.p1 !== 1');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -26,7 +26,7 @@ if(myObj.p1 === 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== undefined){
-  $ERROR('#2: myObj.p1 === undefined . Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === undefined . Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -34,7 +34,7 @@ if(myObj.p1 !== undefined){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.del !== true){
-  $ERROR('#3: myObj.del === true. Actual: myObj.del ===. Actual:  myObj.del ==='+ myObj.del  +myObj.del);
+  throw new Test262Error('#3: myObj.del === true. Actual: myObj.del ===. Actual:  myObj.del ==='+ myObj.del  +myObj.del);
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -42,7 +42,7 @@ if(myObj.del !== true){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if(myObj.p1 === 'a'){
-  $ERROR('#4: myObj.p1 !== \'a\'');
+  throw new Test262Error('#4: myObj.p1 !== \'a\'');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A5_T3.js b/test/language/statements/with/S12.10_A5_T3.js
index 00802080bd..30cb5c8068 100644
--- a/test/language/statements/with/S12.10_A5_T3.js
+++ b/test/language/statements/with/S12.10_A5_T3.js
@@ -19,7 +19,7 @@ eval("with(myObj){del = delete p1}");
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#1
 if(myObj.p1 === true){
-  $ERROR('#1: myObj.p1 !== true ');
+  throw new Test262Error('#1: myObj.p1 !== true ');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -27,7 +27,7 @@ if(myObj.p1 === true){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== undefined){
-  $ERROR('#2: myObj.p1 === undefined . Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === undefined . Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -35,7 +35,7 @@ if(myObj.p1 !== undefined){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.del !== true){
-  $ERROR('#3: myObj.del === true . Actual:  myObj.del ==='+ myObj.del  );
+  throw new Test262Error('#3: myObj.del === true . Actual:  myObj.del ==='+ myObj.del  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -43,7 +43,7 @@ if(myObj.del !== true){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if(myObj.p1 === 'a'){
-  $ERROR('#4: myObj.p1 !== \'a\'');
+  throw new Test262Error('#4: myObj.p1 !== \'a\'');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A5_T4.js b/test/language/statements/with/S12.10_A5_T4.js
index e4e776d43c..84b8687efa 100644
--- a/test/language/statements/with/S12.10_A5_T4.js
+++ b/test/language/statements/with/S12.10_A5_T4.js
@@ -19,11 +19,11 @@ eval("with(myObj){del = delete p1}");
 //CHECK#1
 try{
 if(myObj.p1.a === "hello"){
-  $ERROR('#1: myObj.p1.a !== "hello" ');
+  throw new Test262Error('#1: myObj.p1.a !== "hello" ');
 }
 }catch(e){var x=1};
 if(x !== 1){
-  $ERROR('#1: x === 1. Actual:  x ==='+ x  );
+  throw new Test262Error('#1: x === 1. Actual:  x ==='+ x  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -31,7 +31,7 @@ if(x !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== undefined){
-  $ERROR('#2: myObj.p1 === undefined . Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === undefined . Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -39,7 +39,7 @@ if(myObj.p1 !== undefined){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.del !== true){
-  $ERROR('#3: myObj.del === true . Actual:  myObj.del ==='+ myObj.del  );
+  throw new Test262Error('#3: myObj.del === true . Actual:  myObj.del ==='+ myObj.del  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -47,7 +47,7 @@ if(myObj.del !== true){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if(myObj.p1 === 'a'){
-  $ERROR('#4: myObj.p1 !== \'a\'');
+  throw new Test262Error('#4: myObj.p1 !== \'a\'');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A5_T5.js b/test/language/statements/with/S12.10_A5_T5.js
index 4e463aef06..66f01deca4 100644
--- a/test/language/statements/with/S12.10_A5_T5.js
+++ b/test/language/statements/with/S12.10_A5_T5.js
@@ -19,11 +19,11 @@ eval("with(myObj){del = delete p1}");
 //CHECK#1
 try{
 if(myObj.p1[2] === 3){
-  $ERROR('#1: myObj.p1[2] !== 3 ');
+  throw new Test262Error('#1: myObj.p1[2] !== 3 ');
 }
 }catch(e){var x=1};
 if(x !== 1){
-  $ERROR('#1: x === 1. Actual:  x ==='+ x  );
+  throw new Test262Error('#1: x === 1. Actual:  x ==='+ x  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -31,7 +31,7 @@ if(x !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== undefined){
-  $ERROR('#2: myObj.p1 === undefined . Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === undefined . Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -39,7 +39,7 @@ if(myObj.p1 !== undefined){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.del !== true){
-  $ERROR('#3: myObj.del === true . Actual:  myObj.del ==='+ myObj.del  );
+  throw new Test262Error('#3: myObj.del === true . Actual:  myObj.del ==='+ myObj.del  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -47,7 +47,7 @@ if(myObj.del !== true){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if(myObj.p1 === 'a'){
-  $ERROR('#4: myObj.p1 !== \'a\'');
+  throw new Test262Error('#4: myObj.p1 !== \'a\'');
 }
 //
 //////////////////////////////////////////////////////////////////////////////
diff --git a/test/language/statements/with/S12.10_A5_T6.js b/test/language/statements/with/S12.10_A5_T6.js
index de474520a3..de89d75da7 100644
--- a/test/language/statements/with/S12.10_A5_T6.js
+++ b/test/language/statements/with/S12.10_A5_T6.js
@@ -19,11 +19,11 @@ eval("with(myObj){del = delete p1}");
 //CHECK#1
 try{
 if(myObj.p1() === 0){
-  $ERROR('#1: myObj.p1() !== 0 ');
+  throw new Test262Error('#1: myObj.p1() !== 0 ');
 }
 }catch(e){var x=1};
 if(x !== 1){
-  $ERROR('#1: x === 1. Actual:  x ==='+ x  );
+  throw new Test262Error('#1: x === 1. Actual:  x ==='+ x  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -31,7 +31,7 @@ if(x !== 1){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#2
 if(myObj.p1 !== undefined){
-  $ERROR('#2: myObj.p1 === undefined . Actual:  myObj.p1 ==='+ myObj.p1  );
+  throw new Test262Error('#2: myObj.p1 === undefined . Actual:  myObj.p1 ==='+ myObj.p1  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -39,7 +39,7 @@ if(myObj.p1 !== undefined){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#3
 if(myObj.del !== true){
-  $ERROR('#3: myObj.del === true . Actual:  myObj.del ==='+ myObj.del  );
+  throw new Test262Error('#3: myObj.del === true . Actual:  myObj.del ==='+ myObj.del  );
 }
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -47,7 +47,7 @@ if(myObj.del !== true){
 //////////////////////////////////////////////////////////////////////////////
 //CHECK#4
 if(myObj.p1 === 'a'){
-  $ERROR('#4: myObj.p1 !== \'a\'');
+  throw new Test262Error('#4: myObj.p1 !== \'a\'');
 }
 //
 //////////////////////////////////////////////////////////////////////////////