Improved error handling for temporary file construction

This commit is contained in:
Thorsten Sommer 2025-12-10 16:59:00 +01:00
parent 9120fce1d2
commit 8e82a07a33
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -25,11 +25,11 @@ public static class PandocExport
LOGGER.LogInformation($"The user chose the path '{response.SaveFilePath}' for the Microsoft Word export.");
var tempMarkdownFile = Guid.NewGuid().ToString();
var tempMarkdownFilePath = Path.Combine(Path.GetTempPath(), tempMarkdownFile);
try
{
var tempMarkdownFile = Guid.NewGuid().ToString();
var tempMarkdownFilePath = Path.Combine(Path.GetTempPath(), tempMarkdownFile);
// Extract text content from chat:
var markdownText = markdownContent switch
{