merge_stack_trace Usage Change: Error.throwWithStackTrace( MyCustomException('$e'), trace, ); To: Error.throwWithStackTrace( MyCustomException('$e'), mergeTrace(StackTrace.current, trace), );