StackTrace.fromString constructor

StackTrace.fromString(
  1. 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.dart.dev/stable/2.13.0/dart-core/StackTrace/StackTrace.fromString.html