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

Unified Diff: pkg/analyzer/lib/instrumentation/instrumentation.dart

Issue 816103002: Add InstrumentationService.logPriorityException() and use logException() in refactorings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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
« no previous file with comments | « pkg/analysis_server/lib/src/edit/edit_domain.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/instrumentation/instrumentation.dart
diff --git a/pkg/analyzer/lib/instrumentation/instrumentation.dart b/pkg/analyzer/lib/instrumentation/instrumentation.dart
index 6a7d6272f0eca61e6c88fef7ad02c850a2a11562..3c9974c5184091083870b20bbeb0ca02f2910674 100644
--- a/pkg/analyzer/lib/instrumentation/instrumentation.dart
+++ b/pkg/analyzer/lib/instrumentation/instrumentation.dart
@@ -69,14 +69,14 @@ class InstrumentationService {
String get _timestamp => new DateTime.now().millisecondsSinceEpoch.toString();
/**
- * Log that the given [exception] was thrown, with the given [stackTrace].
+ * Log that the given non-priority [exception] was thrown, with the given
+ * [stackTrace].
*/
void logException(dynamic exception, StackTrace stackTrace) {
Brian Wilkerson 2014/12/19 22:36:18 We might want to add another parameter that can co
if (_instrumentationServer != null) {
String message = _toString(exception);
String trace = _toString(stackTrace);
- _instrumentationServer.logWithPriority(
- '$_timestamp:$TAG_EXCEPTION:$message:$trace');
+ _instrumentationServer.log('$_timestamp:$TAG_EXCEPTION:$message:$trace');
}
}
@@ -88,6 +88,19 @@ class InstrumentationService {
}
/**
+ * Log that the given priority [exception] was thrown, with the given
+ * [stackTrace].
+ */
+ void logPriorityException(dynamic exception, StackTrace stackTrace) {
+ if (_instrumentationServer != null) {
+ String message = _toString(exception);
+ String trace = _toString(stackTrace);
+ _instrumentationServer.logWithPriority(
+ '$_timestamp:$TAG_EXCEPTION:$message:$trace');
+ }
+ }
+
+ /**
* Log that a request has been sent to the client.
*/
void logRequest(String request) {
« no previous file with comments | « pkg/analysis_server/lib/src/edit/edit_domain.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698