W3cubDocs

/Dart 2

StackTrace.fromString constructor

StackTrace.fromString(String stackTraceString)

Create a StackTrace object from stackTraceString.

The created stack trace will have a toString method returning stackTraceString.

The stackTraceString can be a string returned by some other stack trace, or it can be any string at all. If the string doesn't look like a stack trace, code that interprets stack traces is likely to fail, so fake stack traces should be used with care.

Implementation

factory StackTrace.fromString(String stackTraceString) = _StringStackTrace;

© 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/StackTrace.fromString.html