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

Side by Side Diff: pkg/analyzer/lib/src/generated/source.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.source; 8 library engine.source;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 * 514 *
515 * @param absoluteUri the absolute URI to be resolved 515 * @param absoluteUri the absolute URI to be resolved
516 * @return a source object representing the absolute URI 516 * @return a source object representing the absolute URI
517 */ 517 */
518 Source forUri(String absoluteUri) { 518 Source forUri(String absoluteUri) {
519 try { 519 try {
520 Uri uri = parseUriWithException(absoluteUri); 520 Uri uri = parseUriWithException(absoluteUri);
521 if (uri.isAbsolute) { 521 if (uri.isAbsolute) {
522 return _internalResolveUri(null, uri); 522 return _internalResolveUri(null, uri);
523 } 523 }
524 } catch (exception) { 524 } catch (exception, stackTrace) {
525 AnalysisEngine.instance.logger.logError2("Could not resolve URI: $absolute Uri", exception); 525 AnalysisEngine.instance.logger.logError(
526 "Could not resolve URI: $absoluteUri",
527 new CaughtException(exception, stackTrace));
526 } 528 }
527 return null; 529 return null;
528 } 530 }
529 531
530 /** 532 /**
531 * Return a source object representing the given absolute URI, or `null` if th e URI is not 533 * Return a source object representing the given absolute URI, or `null` if th e URI is not
532 * an absolute URI. 534 * an absolute URI.
533 * 535 *
534 * @param absoluteUri the absolute URI to be resolved 536 * @param absoluteUri the absolute URI to be resolved
535 * @return a source object representing the absolute URI 537 * @return a source object representing the absolute URI
536 */ 538 */
537 Source forUri2(Uri absoluteUri) { 539 Source forUri2(Uri absoluteUri) {
538 if (absoluteUri.isAbsolute) { 540 if (absoluteUri.isAbsolute) {
539 try { 541 try {
540 return _internalResolveUri(null, absoluteUri); 542 return _internalResolveUri(null, absoluteUri);
541 } on AnalysisException catch (exception, stackTrace) { 543 } on AnalysisException catch (exception, stackTrace) {
542 AnalysisEngine.instance.logger.logError2("Could not resolve URI: $absolu teUri", new CaughtException(exception, stackTrace)); 544 AnalysisEngine.instance.logger.logError(
545 "Could not resolve URI: $absoluteUri",
546 new CaughtException(exception, stackTrace));
543 } 547 }
544 } 548 }
545 return null; 549 return null;
546 } 550 }
547 551
548 /** 552 /**
549 * Return a source object that is equal to the source object used to obtain th e given encoding. 553 * Return a source object that is equal to the source object used to obtain th e given encoding.
550 * 554 *
551 * @param encoding the encoding of a source object 555 * @param encoding the encoding of a source object
552 * @return a source object that is described by the given encoding 556 * @return a source object that is described by the given encoding
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 * @param containedUri the (possibly relative) URI to be resolved against the containing source 600 * @param containedUri the (possibly relative) URI to be resolved against the containing source
597 * @return the source representing the contained URI 601 * @return the source representing the contained URI
598 */ 602 */
599 Source resolveUri(Source containingSource, String containedUri) { 603 Source resolveUri(Source containingSource, String containedUri) {
600 if (containedUri == null || containedUri.isEmpty) { 604 if (containedUri == null || containedUri.isEmpty) {
601 return null; 605 return null;
602 } 606 }
603 try { 607 try {
604 // Force the creation of an escaped URI to deal with spaces, etc. 608 // Force the creation of an escaped URI to deal with spaces, etc.
605 return _internalResolveUri(containingSource, parseUriWithException(contain edUri)); 609 return _internalResolveUri(containingSource, parseUriWithException(contain edUri));
606 } catch (exception) { 610 } catch (exception, stackTrace) {
607 AnalysisEngine.instance.logger.logError2("Could not resolve URI ($containe dUri) relative to source (${containingSource.fullName})", exception); 611 AnalysisEngine.instance.logger.logError(
612 "Could not resolve URI ($containedUri) relative to source (${containin gSource.fullName})",
613 new CaughtException(exception, stackTrace));
608 return null; 614 return null;
609 } 615 }
610 } 616 }
611 617
612 /** 618 /**
613 * Return an absolute URI that represents the given source, or `null` if a val id URI cannot 619 * Return an absolute URI that represents the given source, or `null` if a val id URI cannot
614 * be computed. 620 * be computed.
615 * 621 *
616 * @param source the source to get URI for 622 * @param source the source to get URI for
617 * @return the absolute URI representing the given source 623 * @return the absolute URI representing the given source
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 914
909 /** 915 /**
910 * Return an absolute URI that represents the given source, or `null` if a val id URI cannot 916 * Return an absolute URI that represents the given source, or `null` if a val id URI cannot
911 * be computed. 917 * be computed.
912 * 918 *
913 * @param source the source to get URI for 919 * @param source the source to get URI for
914 * @return the absolute URI representing the given source 920 * @return the absolute URI representing the given source
915 */ 921 */
916 Uri restoreAbsolute(Source source) => null; 922 Uri restoreAbsolute(Source source) => null;
917 } 923 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/sdk_io.dart ('k') | pkg/analyzer/lib/src/generated/source_io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698