merge_stack_trace

Usage

Change:

Error.throwWithStackTrace(
    MyCustomException('$e'),
    trace,
);

To:

Error.throwWithStackTrace(
    MyCustomException('$e'),
    mergeTrace(StackTrace.current, trace),
);

Libraries

merge_stack_trace
Support for doing something awesome.