Log crashes

This commit is contained in:
2026-01-03 22:31:20 +09:00
parent a5fac2f6c7
commit 2aae3575b4
+19 -1
View File
@@ -60,7 +60,25 @@ class MainViewModel : BaseViewModel, IFontResolver
LogInfo("Chosen folder: " + folder.Path.LocalPath);
if (Directory.Exists(folder.Path.LocalPath))
{
await Task.Run(() => CreatePDF(folder.Path.LocalPath));
try
{
await Task.Run(() => CreatePDF(folder.Path.LocalPath));
} catch (Exception e)
{
LogInfo("PDF process failed! Reason: " + e.Message);
if (e.StackTrace != null)
{
LogInfo(e.StackTrace);
}
if (e.InnerException != null)
{
LogInfo("Inner exception: " + e.InnerException.Message);
if (e.InnerException.StackTrace != null)
{
LogInfo(e.InnerException.StackTrace);
}
}
}
}
}
}