| Index: lib/runtime/dart_utils.js
|
| diff --git a/lib/runtime/dart_utils.js b/lib/runtime/dart_utils.js
|
| index a1c2bf9762b48b8a6ebae02a67a503018c3b7306..40f97f54a43cdff140dc8feed506d76dfe64b223 100644
|
| --- a/lib/runtime/dart_utils.js
|
| +++ b/lib/runtime/dart_utils.js
|
| @@ -21,16 +21,28 @@ var dart_utils =
|
|
|
| const slice = [].slice;
|
|
|
| + class StrongModeError extends Error {
|
| + constructor(message) {
|
| + super(message);
|
| + }
|
| + }
|
| +
|
| + /** This error indicates a strong mode specific failure.
|
| + */
|
| + function throwStrongModeError(message) {
|
| + throw new StrongModeError(message);
|
| + }
|
| + dart_utils.throwStrongModeError = throwStrongModeError;
|
|
|
| /** This error indicates a bug in the runtime or the compiler.
|
| */
|
| - function throwError(message) {
|
| + function throwInternalError(message) {
|
| throw Error(message);
|
| }
|
| - dart_utils.throwError = throwError;
|
| + dart_utils.throwInternalError = throwInternalError;
|
|
|
| function assert(condition) {
|
| - if (!condition) throwError("The compiler is broken: failed assert");
|
| + if (!condition) throwInternalError("The compiler is broken: failed assert");
|
| }
|
| dart_utils.assert = assert;
|
|
|
| @@ -60,7 +72,7 @@ var dart_utils =
|
| value = x;
|
| }
|
| function circularInitError() {
|
| - throwError('circular initialization for field ' + name);
|
| + throwInternalError('circular initialization for field ' + name);
|
| }
|
| function lazyGetter() {
|
| if (init == null) return value;
|
|
|