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

Unified Diff: sdk/lib/_internal/pub/lib/src/log.dart

Issue 430973002: Only support the new source_span spans in barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 6 years, 5 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
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/log.dart
diff --git a/sdk/lib/_internal/pub/lib/src/log.dart b/sdk/lib/_internal/pub/lib/src/log.dart
index 3eb25573c89c4fb50a0b7582e43f5c12aff10ae6..edc7fe0d75f7b422d3cdd9cfd9dcef9f7338d291 100644
--- a/sdk/lib/_internal/pub/lib/src/log.dart
+++ b/sdk/lib/_internal/pub/lib/src/log.dart
@@ -10,7 +10,6 @@ import 'dart:convert';
import 'dart:io';
import 'package:path/path.dart' as p;
-import 'package:source_maps/source_maps.dart';
import 'package:source_span/source_span.dart';
import 'package:stack_trace/stack_trace.dart';
@@ -316,9 +315,7 @@ void exception(exception, [StackTrace trace]) {
// This is basically the top-level exception handler so that we don't
// spew a stack trace on our users.
- if (exception is SpanException) {
- error(exception.toString(useColors: canUseSpecialChars));
- } else if (exception is SourceSpanException) {
+ if (exception is SourceSpanException) {
error(exception.toString(color: canUseSpecialChars));
} else {
error(getErrorMessage(exception));
@@ -510,8 +507,7 @@ class _JsonLogger {
}
// If the error came from a file, include the path.
- if ((error is SpanException || error is SourceSpanException) &&
- error.span.sourceUrl != null) {
+ if (error is SourceSpanException && error.span.sourceUrl != null) {
errorJson["path"] = p.fromUri(error.span.sourceUrl);
}
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/barback/asset_environment.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698