| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:mirrors' show MirrorSystem; | 5 import 'dart:mirrors' show MirrorSystem; |
| 6 import 'dart:convert' show JSON; |
| 6 | 7 |
| 7 patch class Error { | 8 patch class Error { |
| 8 /* patch */ static String _objectToString(Object object) { | 9 /* patch */ static String _objectToString(Object object) { |
| 9 return Object._toString(object); | 10 return Object._toString(object); |
| 10 } | 11 } |
| 11 | 12 |
| 13 /* patch */ static String _stringToSafeString(String string) { |
| 14 return JSON.encode(string); |
| 15 } |
| 16 |
| 12 /* patch */ StackTrace get stackTrace => _stackTrace; | 17 /* patch */ StackTrace get stackTrace => _stackTrace; |
| 13 | 18 |
| 14 StackTrace _stackTrace; | 19 StackTrace _stackTrace; |
| 15 } | 20 } |
| 16 | 21 |
| 17 class _AssertionError extends Error implements AssertionError { | 22 class _AssertionError extends Error implements AssertionError { |
| 18 _AssertionError._create( | 23 _AssertionError._create( |
| 19 this._failedAssertion, this._url, this._line, this._column); | 24 this._failedAssertion, this._url, this._line, this._column); |
| 20 | 25 |
| 21 static _throwNew(int assertionStart, int assertionEnd) | 26 static _throwNew(int assertionStart, int assertionEnd) |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 String toString() => "Javascript Integer Overflow: $_value"; | 342 String toString() => "Javascript Integer Overflow: $_value"; |
| 338 } | 343 } |
| 339 | 344 |
| 340 class _JavascriptCompatibilityError extends Error { | 345 class _JavascriptCompatibilityError extends Error { |
| 341 final String _msg; | 346 final String _msg; |
| 342 | 347 |
| 343 _JavascriptCompatibilityError(this._msg); | 348 _JavascriptCompatibilityError(this._msg); |
| 344 String toString() => "Javascript Compatibility Error: $_msg"; | 349 String toString() => "Javascript Compatibility Error: $_msg"; |
| 345 } | 350 } |
| 346 | 351 |
| OLD | NEW |