Index: sdk/lib/core/stacktrace.dart |
diff --git a/sdk/lib/core/stacktrace.dart b/sdk/lib/core/stacktrace.dart |
index c8540dc47bb840aa73fd256b5afd939426a2c440..17abd3831ed957102d61eaa16093b9e31e33a8a4 100644 |
--- a/sdk/lib/core/stacktrace.dart |
+++ b/sdk/lib/core/stacktrace.dart |
@@ -31,6 +31,18 @@ abstract class StackTrace { |
factory StackTrace.fromString(String stackTraceString) = _StringStackTrace; |
/** |
+ * Returns a representation of the current stack trace. |
+ * |
+ * This is similar to what can be achieved by doing: |
+ * |
+ * try { throw 0; } catch (_, stack) { return stack; } |
+ * |
+ * The getter achieves this without throwing, except on platforms that |
+ * have no other way to get a stack trace. |
+ */ |
+ external static StackTrace get current; |
+ |
+ /** |
* Returns a [String] representation of the stack trace. |
* |
* The string represents the full stack trace starting from |