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

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

Issue 2044753002: Make compile-time errors catchable (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments Created 4 years, 3 months 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
« no previous file with comments | « no previous file | runtime/vm/clustered_snapshot.cc » ('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 import 'dart:_internal' as internal; 5 import 'dart:_internal' as internal;
6 import 'dart:convert' show JSON; 6 import 'dart:convert' show JSON;
7 7
8 @patch class Error { 8 @patch class Error {
9 @patch static String _objectToString(Object object) { 9 @patch static String _objectToString(Object object) {
10 return Object._toString(object); 10 return Object._toString(object);
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 msg_buf.write( 351 msg_buf.write(
352 "NoSuchMethodError: incorrect number of arguments passed to " 352 "NoSuchMethodError: incorrect number of arguments passed to "
353 "method named '$memberName'\n" 353 "method named '$memberName'\n"
354 "Receiver: $receiver_str\n" 354 "Receiver: $receiver_str\n"
355 "Tried calling: $memberName($actualParameters)\n" 355 "Tried calling: $memberName($actualParameters)\n"
356 "Found: $memberName($formalParameters)"); 356 "Found: $memberName($formalParameters)");
357 } 357 }
358 return msg_buf.toString(); 358 return msg_buf.toString();
359 } 359 }
360 } 360 }
361
362
363 class _CompileTimeError extends Error {
364 final String _errorMsg;
365 _CompileTimeError(this._errorMsg);
366 String toString() => _errorMsg;
367 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/clustered_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698