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

Unified Diff: pkg/analyzer/lib/src/generated/ast.dart

Issue 685993004: Clean up logging uses (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/generated/ast.dart
diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart
index 42169c033634573d9a6c3a4ae623ea6ab57d5566..c156ede8b9067217851a908dbbee30b6c653a05c 100644
--- a/pkg/analyzer/lib/src/generated/ast.dart
+++ b/pkg/analyzer/lib/src/generated/ast.dart
@@ -801,7 +801,9 @@ class AssignmentExpression extends Expression {
} else {
message = "The right-hand size is null";
}
- AnalysisEngine.instance.logger.logError2(message, new JavaException(message));
+ AnalysisEngine.instance.logger.logError(
+ message,
+ new CaughtException(new AnalysisException(message), null));
}
this._leftHandSide = becomeParentOf(leftHandSide);
this._rightHandSide = becomeParentOf(rightHandSide);
@@ -12443,8 +12445,10 @@ class NodeLocator extends UnifyingAstVisitor<Object> {
node.accept(this);
} on NodeLocator_NodeFoundException catch (exception) {
// A node with the right source position was found.
- } catch (exception) {
- AnalysisEngine.instance.logger.logInformation2("Unable to locate element at offset ($_startOffset - $_endOffset)", exception);
+ } catch (exception, stackTrace) {
+ AnalysisEngine.instance.logger.logInformation(
+ "Unable to locate element at offset ($_startOffset - $_endOffset)",
+ new CaughtException(exception, stackTrace));
return null;
}
return _foundNode;
@@ -12463,10 +12467,12 @@ class NodeLocator extends UnifyingAstVisitor<Object> {
try {
node.visitChildren(this);
} on NodeLocator_NodeFoundException catch (exception) {
- throw exception;
- } catch (exception) {
+ rethrow;
+ } catch (exception, stackTrace) {
// Ignore the exception and proceed in order to visit the rest of the structure.
- AnalysisEngine.instance.logger.logInformation2("Exception caught while traversing an AST structure.", exception);
+ AnalysisEngine.instance.logger.logInformation(
+ "Exception caught while traversing an AST structure.",
+ new CaughtException(exception, stackTrace));
}
if (start <= _startOffset && _endOffset <= end) {
_foundNode = node;
@@ -16452,7 +16458,9 @@ class SimpleIdentifier extends Identifier {
*/
Element _returnOrReportElement(AstNode parent, bool isValid, Element element) {
if (!isValid) {
- AnalysisEngine.instance.logger.logInformation2("Internal error: attempting to set the name of a ${parent.runtimeType} to a ${element.runtimeType}", new JavaException());
+ AnalysisEngine.instance.logger.logInformation(
+ "Internal error: attempting to set the name of a ${parent.runtimeType} to a ${element.runtimeType}",
+ new CaughtException(new AnalysisException(), null));
return null;
}
return element;
« no previous file with comments | « pkg/analysis_server/test/services/index/store/split_store_test.dart ('k') | pkg/analyzer/lib/src/generated/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698