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 3ad49089e7a031dca8ec742f53a0931c64ed7c29..10f220db506fee0165d012d6e9c1532687712880 100644 |
--- a/sdk/lib/_internal/pub/lib/src/log.dart |
+++ b/sdk/lib/_internal/pub/lib/src/log.dart |
@@ -76,7 +76,8 @@ class Entry { |
void error(message, [error]) { |
if (error != null) { |
message = "$message: $error"; |
- var trace = getAttachedStackTrace(error); |
+ var trace; |
+ if (error is Error) trace = error.stackTrace; |
if (trace != null) { |
message = "$message\nStackTrace: $trace"; |
} |