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

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

Issue 11233032: [core] cleanup === and !== (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | lib/core/exceptions.dart » ('j') | lib/core/expect.dart » ('J')
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 : this._existingArgumentNames = existingArgumentNames; 81 : this._existingArgumentNames = existingArgumentNames;
82 82
83 String toString() { 83 String toString() {
84 StringBuffer sb = new StringBuffer(); 84 StringBuffer sb = new StringBuffer();
85 for (int i = 0; i < _arguments.length; i++) { 85 for (int i = 0; i < _arguments.length; i++) {
86 if (i > 0) { 86 if (i > 0) {
87 sb.add(", "); 87 sb.add(", ");
88 } 88 }
89 sb.add(safeToString(_arguments[i])); 89 sb.add(safeToString(_arguments[i]));
90 } 90 }
91 if (_existingArgumentNames === null) { 91 if (_existingArgumentNames == null) {
92 return "NoSuchMethodError : method not found: '$_functionName'\n" 92 return "NoSuchMethodError : method not found: '$_functionName'\n"
93 "Receiver: ${safeToString(_receiver)}\n" 93 "Receiver: ${safeToString(_receiver)}\n"
94 "Arguments: [$sb]"; 94 "Arguments: [$sb]";
95 } else { 95 } else {
96 String actualParameters = sb.toString(); 96 String actualParameters = sb.toString();
97 sb = new StringBuffer(); 97 sb = new StringBuffer();
98 for (int i = 0; i < _existingArgumentNames.length; i++) { 98 for (int i = 0; i < _existingArgumentNames.length; i++) {
99 if (i > 0) { 99 if (i > 0) {
100 sb.add(", "); 100 sb.add(", ");
101 } 101 }
(...skipping 26 matching lines...) Expand all
128 } 128 }
129 129
130 external static String _objectToString(Object object); 130 external static String _objectToString(Object object);
131 } 131 }
132 132
133 133
134 class OutOfMemoryError implements Exception { 134 class OutOfMemoryError implements Exception {
135 const OutOfMemoryError(); 135 const OutOfMemoryError();
136 String toString() => "Out of Memory"; 136 String toString() => "Out of Memory";
137 } 137 }
OLDNEW
« no previous file with comments | « no previous file | lib/core/exceptions.dart » ('j') | lib/core/expect.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698