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

Side by Side Diff: lib/core/errors.dart

Issue 11227027: Revert 13878 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | lib/core/exceptions.dart » ('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 class Error { 5 class Error {
6 const Error(); 6 const Error();
7 } 7 }
8 8
9 class AssertionError implements Error { 9 class AssertionError implements Error {
10 } 10 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 : this._existingArgumentNames = existingArgumentNames; 87 : this._existingArgumentNames = existingArgumentNames;
88 88
89 String toString() { 89 String toString() {
90 StringBuffer sb = new StringBuffer(); 90 StringBuffer sb = new StringBuffer();
91 for (int i = 0; i < _arguments.length; i++) { 91 for (int i = 0; i < _arguments.length; i++) {
92 if (i > 0) { 92 if (i > 0) {
93 sb.add(", "); 93 sb.add(", ");
94 } 94 }
95 sb.add(safeToString(_arguments[i])); 95 sb.add(safeToString(_arguments[i]));
96 } 96 }
97 if (_existingArgumentNames == null) { 97 if (_existingArgumentNames === null) {
98 return "NoSuchMethodError : method not found: '$_functionName'\n" 98 return "NoSuchMethodError : method not found: '$_functionName'\n"
99 "Receiver: ${safeToString(_receiver)}\n" 99 "Receiver: ${safeToString(_receiver)}\n"
100 "Arguments: [$sb]"; 100 "Arguments: [$sb]";
101 } else { 101 } else {
102 String actualParameters = sb.toString(); 102 String actualParameters = sb.toString();
103 sb = new StringBuffer(); 103 sb = new StringBuffer();
104 for (int i = 0; i < _existingArgumentNames.length; i++) { 104 for (int i = 0; i < _existingArgumentNames.length; i++) {
105 if (i > 0) { 105 if (i > 0) {
106 sb.add(", "); 106 sb.add(", ");
107 } 107 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 class OutOfMemoryError implements Error { 140 class OutOfMemoryError implements Error {
141 const OutOfMemoryError(); 141 const OutOfMemoryError();
142 String toString() => "Out of Memory"; 142 String toString() => "Out of Memory";
143 } 143 }
144 144
145 class StackOverflowError implements Error { 145 class StackOverflowError implements Error {
146 const StackOverflowError(); 146 const StackOverflowError();
147 String toString() => "Stack Overflow"; 147 String toString() => "Stack Overflow";
148 } 148 }
OLDNEW
« no previous file with comments | « no previous file | lib/core/exceptions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698