mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 12:44:46 +01:00
Add debug-specific error message in AutoTranslate.cs
In a wrap catch of the AutoTranslate.cs file, a conditional directive was added to display different error messages for DEBUG and RELEASE modes. This ensures that detailed exception information is shown during debugging for better troubleshooting, while a more user-friendly message is used in the release build. Signed-off-by: Ivandro Jao <ivandrofly@gmail.com>
This commit is contained in:
parent
be16964b95
commit
b915d491c7
@ -1467,8 +1467,12 @@ namespace Nikse.SubtitleEdit.Forms.Translate
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
#if DEBUG
|
||||
MessageBox.Show(exception.Message);
|
||||
#else
|
||||
MessageBox.Show("Unable to get ollama models - is ollama running?" + Environment.NewLine + exception.Message, Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
SeLogger.Error(exception, "Unable to get ollama models");
|
||||
#endif
|
||||
}
|
||||
|
||||
async Task<List<string>> GetModelsAsync(string url)
|
||||
|
Loading…
Reference in New Issue
Block a user