Log crashes
This commit is contained in:
@@ -59,8 +59,26 @@ class MainViewModel : BaseViewModel, IFontResolver
|
||||
var folder = folders[0];
|
||||
LogInfo("Chosen folder: " + folder.Path.LocalPath);
|
||||
if (Directory.Exists(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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user