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

Side by Side Diff: pkg/analyzer/lib/src/generated/sdk_io.dart

Issue 685993004: Clean up logging uses (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.sdk.io; 8 library engine.sdk.io;
9 9
10 import 'package:analyzer/src/generated/java_engine.dart';
11
10 import 'java_core.dart'; 12 import 'java_core.dart';
11 import 'java_io.dart'; 13 import 'java_io.dart';
12 import 'java_engine_io.dart'; 14 import 'java_engine_io.dart';
13 import 'source_io.dart'; 15 import 'source_io.dart';
14 import 'error.dart'; 16 import 'error.dart';
15 import 'scanner.dart'; 17 import 'scanner.dart';
16 import 'ast.dart'; 18 import 'ast.dart';
17 import 'parser.dart'; 19 import 'parser.dart';
18 import 'sdk.dart'; 20 import 'sdk.dart';
19 import 'engine.dart'; 21 import 'engine.dart';
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 if (!filePath.startsWith("$libPath${JavaFile.separator}")) { 248 if (!filePath.startsWith("$libPath${JavaFile.separator}")) {
247 return null; 249 return null;
248 } 250 }
249 filePath = filePath.substring(libPath.length + 1); 251 filePath = filePath.substring(libPath.length + 1);
250 for (SdkLibrary library in _libraryMap.sdkLibraries) { 252 for (SdkLibrary library in _libraryMap.sdkLibraries) {
251 String libraryPath = library.path; 253 String libraryPath = library.path;
252 if (filePath.replaceAll('\\', '/') == libraryPath) { 254 if (filePath.replaceAll('\\', '/') == libraryPath) {
253 String path = library.shortName; 255 String path = library.shortName;
254 try { 256 try {
255 return new FileBasedSource.con2(parseUriWithException(path), file); 257 return new FileBasedSource.con2(parseUriWithException(path), file);
256 } on URISyntaxException catch (exception) { 258 } on URISyntaxException catch (exception, stackTrace) {
257 AnalysisEngine.instance.logger.logInformation2("Failed to create URI: $path", exception); 259 AnalysisEngine.instance.logger.logInformation(
260 "Failed to create URI: $path",
261 new CaughtException(exception, stackTrace));
258 return null; 262 return null;
259 } 263 }
260 } 264 }
261 libraryPath = new JavaFile(libraryPath).getParent(); 265 libraryPath = new JavaFile(libraryPath).getParent();
262 if (filePath.startsWith("$libraryPath${JavaFile.separator}")) { 266 if (filePath.startsWith("$libraryPath${JavaFile.separator}")) {
263 String path = "${library.shortName}/${filePath.substring(libraryPath.len gth + 1)}"; 267 String path = "${library.shortName}/${filePath.substring(libraryPath.len gth + 1)}";
264 try { 268 try {
265 return new FileBasedSource.con2(parseUriWithException(path), file); 269 return new FileBasedSource.con2(parseUriWithException(path), file);
266 } on URISyntaxException catch (exception) { 270 } on URISyntaxException catch (exception, stackTrace) {
267 AnalysisEngine.instance.logger.logInformation2("Failed to create URI: $path", exception); 271 AnalysisEngine.instance.logger.logInformation(
272 "Failed to create URI: $path",
273 new CaughtException(exception, stackTrace));
268 return null; 274 return null;
269 } 275 }
270 } 276 }
271 } 277 }
272 return null; 278 return null;
273 } 279 }
274 280
275 @override 281 @override
276 AnalysisContext get context { 282 AnalysisContext get context {
277 if (_analysisContext == null) { 283 if (_analysisContext == null) {
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 * Read all of the configuration files to initialize the library maps. 496 * Read all of the configuration files to initialize the library maps.
491 * 497 *
492 * @param useDart2jsPaths `true` if the dart2js path should be used when it is available 498 * @param useDart2jsPaths `true` if the dart2js path should be used when it is available
493 * @return the initialized library map 499 * @return the initialized library map
494 */ 500 */
495 LibraryMap initialLibraryMap(bool useDart2jsPaths) { 501 LibraryMap initialLibraryMap(bool useDart2jsPaths) {
496 JavaFile librariesFile = new JavaFile.relative(new JavaFile.relative(library Directory, _INTERNAL_DIR), _LIBRARIES_FILE); 502 JavaFile librariesFile = new JavaFile.relative(new JavaFile.relative(library Directory, _INTERNAL_DIR), _LIBRARIES_FILE);
497 try { 503 try {
498 String contents = librariesFile.readAsStringSync(); 504 String contents = librariesFile.readAsStringSync();
499 return new SdkLibrariesReader(useDart2jsPaths).readFromFile(librariesFile, contents); 505 return new SdkLibrariesReader(useDart2jsPaths).readFromFile(librariesFile, contents);
500 } catch (exception) { 506 } catch (exception, stackTrace) {
501 AnalysisEngine.instance.logger.logError2("Could not initialize the library map from ${librariesFile.getAbsolutePath()}", exception); 507 AnalysisEngine.instance.logger.logError(
508 "Could not initialize the library map from ${librariesFile.getAbsolute Path()}",
509 new CaughtException(exception, stackTrace));
502 return new LibraryMap(); 510 return new LibraryMap();
503 } 511 }
504 } 512 }
505 513
506 /** 514 /**
507 * Ensure that the dart VM is executable. If it is not, make it executable and log that it was 515 * Ensure that the dart VM is executable. If it is not, make it executable and log that it was
508 * necessary for us to do so. 516 * necessary for us to do so.
509 */ 517 */
510 void _ensureVmIsExecutable() { 518 void _ensureVmIsExecutable() {
511 } 519 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 Parser parser = new Parser(source, errorListener); 614 Parser parser = new Parser(source, errorListener);
607 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize()); 615 CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize());
608 SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_Li braryBuilder(_useDart2jsPaths); 616 SdkLibrariesReader_LibraryBuilder libraryBuilder = new SdkLibrariesReader_Li braryBuilder(_useDart2jsPaths);
609 // If any syntactic errors were found then don't try to visit the AST struct ure. 617 // If any syntactic errors were found then don't try to visit the AST struct ure.
610 if (!errorListener.errorReported) { 618 if (!errorListener.errorReported) {
611 unit.accept(libraryBuilder); 619 unit.accept(libraryBuilder);
612 } 620 }
613 return libraryBuilder.librariesMap; 621 return libraryBuilder.librariesMap;
614 } 622 }
615 } 623 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/lib/src/generated/source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698