Don't kill software when there's an exception

This commit is contained in:
2026-02-16 19:41:02 +09:00
parent f55f22415f
commit f47200d636
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -293,6 +293,7 @@ class MainViewModel : BaseViewModel, IFontResolver
} }
} }
LogInfo("Please report this error to a programmer or fix the issue listed above."); LogInfo("Please report this error to a programmer or fix the issue listed above.");
IsCreatingPDF = false;
} }
} }
} }
@@ -442,7 +443,9 @@ class MainViewModel : BaseViewModel, IFontResolver
var filePath = file.FilePath; var filePath = file.FilePath;
if (!File.Exists(filePath)) if (!File.Exists(filePath))
{ {
LogInfo("ERROR: File {0} does not exist at path {1}. Please remove it from the report or re-add it using the Add Item button if you still want it to be in this report.", file.Title, file.FilePath); LogInfo("ERROR: File \"{0}\" does not exist at path \"{1}\". Please remove it from the report or re-add it using the Add Item button if you still want it to be in this report.", file.Title, file.FilePath);
IsCreatingPDF = false;
return;
} }
if (fileName == ".DS_Store" || fileName == outputFileName) if (fileName == ".DS_Store" || fileName == outputFileName)
{ {
+1 -1
View File
@@ -113,7 +113,7 @@
<DataGrid.RowDetailsTemplate> <DataGrid.RowDetailsTemplate>
<DataTemplate x:DataType="models:ReportFile"> <DataTemplate x:DataType="models:ReportFile">
<TextBlock TextWrapping="Wrap" Margin="4,4,4,0"> <TextBlock TextWrapping="Wrap" Margin="4,4,4,0">
<Run FontWeight="Bold" Text="File Name"/>: <Run Text="{Binding FileName}"/> <Run FontWeight="Bold" Text="File Path"/>: <Run Text="{Binding FilePath}"/>
<LineBreak/> <LineBreak/>
<Run FontWeight="Bold" Text="Notes"/>: <Run Text="{Binding Notes}"/> <Run FontWeight="Bold" Text="Notes"/>: <Run Text="{Binding Notes}"/>
</TextBlock> </TextBlock>