W3cubDocs

/Dart 2

current property

StackTrace current

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.

Implementation

external static StackTrace get current;

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-core/StackTrace/current.html