diff --git a/src/dawn_native/Device.cpp b/src/dawn_native/Device.cpp index efa8d2d86e..4c90c6f5fb 100644 --- a/src/dawn_native/Device.cpp +++ b/src/dawn_native/Device.cpp @@ -210,7 +210,13 @@ namespace dawn_native { void DeviceBase::ConsumeError(std::unique_ptr error) { ASSERT(error != nullptr); - HandleError(error->GetType(), error->GetMessage().c_str()); + std::ostringstream ss; + ss << error->GetMessage(); + for (const auto& callsite : error->GetBacktrace()) { + ss << "\n at " << callsite.function << " (" << callsite.file << ":" << callsite.line + << ")"; + } + HandleError(error->GetType(), ss.str().c_str()); } void DeviceBase::SetUncapturedErrorCallback(wgpu::ErrorCallback callback, void* userdata) {