Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Side by Side Diff: runtime/lib/errors_patch.dart

Issue 30533004: Report correct error message in case of super invocation (fix issue 8208). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/lib/invocation_mirror.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 */ StackTrace get stackTrace => _stackTrace; 10 /* patch */ StackTrace get stackTrace => _stackTrace;
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 if (_receiver is Function) { 216 if (_receiver is Function) {
217 msg = "Closure call with mismatched arguments: " 217 msg = "Closure call with mismatched arguments: "
218 "function '$memberName'"; 218 "function '$memberName'";
219 } else { 219 } else {
220 msg = "Class '${_receiver.runtimeType}' has no instance $type_str " 220 msg = "Class '${_receiver.runtimeType}' has no instance $type_str "
221 "'$memberName'$args_message."; 221 "'$memberName'$args_message.";
222 } 222 }
223 } 223 }
224 break; 224 break;
225 } 225 }
226 case _InvocationMirror._SUPER: {
227 msg = "Super class of class '${_receiver.runtimeType}' has no instance "
228 "$type_str '$memberName'$args_message.";
229 break;
230 }
226 case _InvocationMirror._STATIC: { 231 case _InvocationMirror._STATIC: {
227 msg = "No static $type_str '$memberName' declared in class " 232 msg = "No static $type_str '$memberName' declared in class "
228 "'$_receiver'."; 233 "'$_receiver'.";
229 break; 234 break;
230 } 235 }
231 case _InvocationMirror._CONSTRUCTOR: { 236 case _InvocationMirror._CONSTRUCTOR: {
232 msg = "No constructor '$memberName'$args_message declared in class '$_re ceiver'."; 237 msg = "No constructor '$memberName'$args_message declared in class '$_re ceiver'.";
233 break; 238 break;
234 } 239 }
235 case _InvocationMirror._TOP_LEVEL: { 240 case _InvocationMirror._TOP_LEVEL: {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 return msg_buf.toString(); 309 return msg_buf.toString();
305 } 310 }
306 } 311 }
307 312
308 class _JavascriptIntegerOverflowError extends Error { 313 class _JavascriptIntegerOverflowError extends Error {
309 final Object _value; 314 final Object _value;
310 315
311 _JavascriptIntegerOverflowError(this._value); 316 _JavascriptIntegerOverflowError(this._value);
312 String toString() => "Javascript Integer Overflow: $_value"; 317 String toString() => "Javascript Integer Overflow: $_value";
313 } 318 }
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/invocation_mirror.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698