Is it possible to throw a fake stack trace in dart? For example, I have this code:
final FakeStartContext startContext = FakeStartContext(
runOverride: () async => throw Exception(fakeError),
);
It is overriding a function by throwing a fake exceptionMsg to it. Is there a way to throw a fake stack trace in addition to the fake error as well? Like something similar to this:
final FakeStartContext startContext = FakeStartContext(
runOverride: () async => throw Exception(fakeError, fakeStackTrace),
);
Such that it could be caught by catch(err, stacktrace)?