Log crashes

This commit is contained in:
2026-01-03 22:31:20 +09:00
parent a5fac2f6c7
commit 2aae3575b4
+18
View File
@@ -59,8 +59,26 @@ class MainViewModel : BaseViewModel, IFontResolver
var folder = folders[0]; var folder = folders[0];
LogInfo("Chosen folder: " + folder.Path.LocalPath); LogInfo("Chosen folder: " + folder.Path.LocalPath);
if (Directory.Exists(folder.Path.LocalPath)) if (Directory.Exists(folder.Path.LocalPath))
{
try
{ {
await Task.Run(() => CreatePDF(folder.Path.LocalPath)); 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);
}
}
}
} }
} }
} }