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

Side by Side Diff: lib/compiler/implementation/dart2js.dart

Issue 10989013: Change IllegalArgumentException to ArgumentError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated co19 test expectations. 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
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 #library('dart2js'); 5 #library('dart2js');
6 6
7 #import('dart:io'); 7 #import('dart:io');
8 #import('dart:uri'); 8 #import('dart:uri');
9 #import('dart:utf'); 9 #import('dart:utf');
10 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 if (arguments.length > 1) { 165 if (arguments.length > 1) {
166 var extra = arguments.getRange(1, arguments.length - 1); 166 var extra = arguments.getRange(1, arguments.length - 1);
167 helpAndFail('Error: Extra arguments: ${Strings.join(extra, " ")}'); 167 helpAndFail('Error: Extra arguments: ${Strings.join(extra, " ")}');
168 } 168 }
169 169
170 Map<String, SourceFile> sourceFiles = <String, SourceFile>{}; 170 Map<String, SourceFile> sourceFiles = <String, SourceFile>{};
171 int dartBytesRead = 0; 171 int dartBytesRead = 0;
172 172
173 Future<String> provider(Uri uri) { 173 Future<String> provider(Uri uri) {
174 if (uri.scheme != 'file') { 174 if (uri.scheme != 'file') {
175 throw new IllegalArgumentException(uri); 175 throw new ArgumentError(uri);
176 } 176 }
177 String source; 177 String source;
178 try { 178 try {
179 source = readAll(uriPathToNative(uri.path)); 179 source = readAll(uriPathToNative(uri.path));
180 } on FileIOException catch (ex) { 180 } on FileIOException catch (ex) {
181 throw 'Error: Cannot read "${relativize(cwd, uri, isWindows)}" ' 181 throw 'Error: Cannot read "${relativize(cwd, uri, isWindows)}" '
182 '(${ex.osError}).'; 182 '(${ex.osError}).';
183 } 183 }
184 dartBytesRead += source.length; 184 dartBytesRead += source.length;
185 sourceFiles[uri.toString()] = 185 sourceFiles[uri.toString()] =
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 } catch (ignored) { 400 } catch (ignored) {
401 print('Internal error: error while printing exception'); 401 print('Internal error: error while printing exception');
402 } 402 }
403 try { 403 try {
404 print(trace); 404 print(trace);
405 } finally { 405 } finally {
406 exit(253); // 253 is recognized as a crash by our test scripts. 406 exit(253); // 253 is recognized as a crash by our test scripts.
407 } 407 }
408 } 408 }
409 } 409 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/lib/coreimpl_patch.dart » ('j') | lib/core/errors.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698