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 | 5 @patch |
6 class Error { | 6 class Error { |
7 @patch | 7 @patch |
8 static String _objectToString(Object object) { | 8 static String _objectToString(Object object) { |
9 return Object._toString(object); | 9 return Object._toString(object); |
10 } | 10 } |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 // Fields _url, _line, and _column are only used for debugging purposes. | 107 // Fields _url, _line, and _column are only used for debugging purposes. |
108 final String _url; | 108 final String _url; |
109 final int _line; | 109 final int _line; |
110 final int _column; | 110 final int _column; |
111 final String _errorMsg; | 111 final String _errorMsg; |
112 } | 112 } |
113 | 113 |
114 @patch | 114 @patch |
115 class FallThroughError { | 115 class FallThroughError { |
116 FallThroughError._create(this._url, this._line); | 116 @patch |
| 117 FallThroughError._create(String url, int line) |
| 118 : _url = url, |
| 119 _line = line; |
117 | 120 |
118 static _throwNew(int case_clause_pos) native "FallThroughError_throwNew"; | 121 static _throwNew(int case_clause_pos) native "FallThroughError_throwNew"; |
119 | 122 |
120 @patch | 123 @patch |
121 String toString() { | 124 String toString() { |
122 return "'$_url': Switch case fall-through at line $_line."; | 125 return "'$_url': Switch case fall-through at line $_line."; |
123 } | 126 } |
124 | 127 |
125 // These new fields cannot be declared final, because a constructor exists | 128 // These new fields cannot be declared final, because a constructor exists |
126 // in the original version of this patched class. | 129 // in the original version of this patched class. |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 _DuplicatedFieldInitializerError(this._name); | 432 _DuplicatedFieldInitializerError(this._name); |
430 | 433 |
431 toString() => "Error: field '$_name' is already initialized."; | 434 toString() => "Error: field '$_name' is already initialized."; |
432 } | 435 } |
433 | 436 |
434 @patch | 437 @patch |
435 class _ConstantExpressionError { | 438 class _ConstantExpressionError { |
436 @patch | 439 @patch |
437 _throw(error) => throw error; | 440 _throw(error) => throw error; |
438 } | 441 } |
OLD | NEW |