| 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 @patch class Error { | 5 @patch class Error { |
| 6 @patch static String _objectToString(Object object) { | 6 @patch static String _objectToString(Object object) { |
| 7 return Object._toString(object); | 7 return Object._toString(object); |
| 8 } | 8 } |
| 9 | 9 |
| 10 @patch static String _stringToSafeString(String string) { | 10 @patch static String _stringToSafeString(String string) { |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 final int _line; | 96 final int _line; |
| 97 final int _column; | 97 final int _column; |
| 98 final String _errorMsg; | 98 final String _errorMsg; |
| 99 } | 99 } |
| 100 | 100 |
| 101 @patch class FallThroughError { | 101 @patch class FallThroughError { |
| 102 FallThroughError._create(this._url, this._line); | 102 FallThroughError._create(this._url, this._line); |
| 103 | 103 |
| 104 static _throwNew(int case_clause_pos) native "FallThroughError_throwNew"; | 104 static _throwNew(int case_clause_pos) native "FallThroughError_throwNew"; |
| 105 | 105 |
| 106 @patch String toString() { | 106 String toString() { |
| 107 return "'$_url': Switch case fall-through at line $_line."; | 107 return "'$_url': Switch case fall-through at line $_line."; |
| 108 } | 108 } |
| 109 | 109 |
| 110 // These new fields cannot be declared final, because a constructor exists | 110 // These new fields cannot be declared final, because a constructor exists |
| 111 // in the original version of this patched class. | 111 // in the original version of this patched class. |
| 112 String _url; | 112 String _url; |
| 113 int _line; | 113 int _line; |
| 114 } | 114 } |
| 115 | 115 |
| 116 class _InternalError { | 116 class _InternalError { |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 return msg_buf.toString(); | 347 return msg_buf.toString(); |
| 348 } | 348 } |
| 349 } | 349 } |
| 350 | 350 |
| 351 | 351 |
| 352 class _CompileTimeError extends Error { | 352 class _CompileTimeError extends Error { |
| 353 final String _errorMsg; | 353 final String _errorMsg; |
| 354 _CompileTimeError(this._errorMsg); | 354 _CompileTimeError(this._errorMsg); |
| 355 String toString() => _errorMsg; | 355 String toString() => _errorMsg; |
| 356 } | 356 } |
| OLD | NEW |