FText FWindowsErrorReport::DiagnoseReport() const { // Mark the callstack as invalid. bValidCallstack = false; // Should check if there are local PDBs before doing anything auto CrashDebugHelper = CrashHelperModule ? CrashHelperModule->Get() : nullptr; if (!CrashDebugHelper) { // Not localized: should never be seen return FText::FromString(TEXT("Failed to load CrashDebugHelper.")); } FString DumpFilename; if (!FindFirstReportFileWithExtension(DumpFilename, TEXT(".dmp"))) { if (!FindFirstReportFileWithExtension(DumpFilename, TEXT(".mdmp"))) { return LOCTEXT("MinidumpNotFound", "No minidump found for this crash."); } } if (!CrashDebugHelper->CreateMinidumpDiagnosticReport(ReportDirectory / DumpFilename)) { return LOCTEXT("NoDebuggingSymbols", "You do not have any debugging symbols required to display the callstack for this crash."); } // No longer required, only for backward compatibility, mark the callstack as valid. bValidCallstack = true; return FText(); }
FText FMacErrorReport::DiagnoseReport() const { // Should check if there are local PDBs before doing anything auto CrashDebugHelper = CrashHelperModule ? CrashHelperModule->Get() : nullptr; if (!CrashDebugHelper) { // Not localized: should never be seen return FText::FromString(TEXT("Failed to load CrashDebugHelper.")); } FString DumpFilename; if (!FindFirstReportFileWithExtension(DumpFilename, TEXT(".dmp"))) { if (!FindFirstReportFileWithExtension(DumpFilename, TEXT(".mdmp"))) { return FText::FromString("No minidump found for this crash."); } } FCrashDebugInfo DebugInfo; if (!CrashDebugHelper->ParseCrashDump(ReportDirectory / DumpFilename, DebugInfo)) { return FText::FromString("No minidump found for this crash."); } if ( !CrashDebugHelper->CreateMinidumpDiagnosticReport(ReportDirectory / DumpFilename) ) { return LOCTEXT("NoDebuggingSymbols", "You do not have any debugging symbols required to display the callstack for this crash."); } else { FString CrashDump; FString DiagnosticsPath = ReportDirectory / FCrashReportClientConfig::Get().GetDiagnosticsFilename(); CrashDebugHelper->CrashInfo.GenerateReport( DiagnosticsPath ); if ( FFileHelper::LoadFileToString( CrashDump, *(ReportDirectory / FCrashReportClientConfig::Get().GetDiagnosticsFilename() ) ) ) { return FText::FromString(CrashDump); } else { return FText::FromString("Failed to create diagnosis information."); } } }