Compare commits

..

1 Commits

Author SHA1 Message Date
Robert McRackan
0e9f2c7681 Truncate too-long error message 2020-12-22 11:38:03 -05:00
2 changed files with 9 additions and 2 deletions

View File

@@ -13,7 +13,7 @@
<!-- <PublishSingleFile>true</PublishSingleFile> -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<Version>4.1.5.1</Version>
<Version>4.1.6.1</Version>
</PropertyGroup>
<ItemGroup>

View File

@@ -1,6 +1,7 @@
using System;
using System.Threading.Tasks;
using DataLayer;
using Dinah.Core;
using Dinah.Core.ErrorHandling;
using FileLiberator;
@@ -346,6 +347,12 @@ namespace LibationWinForms.BookLiberation
try
{
const int TRUNC = 150;
var errMsg = ex.Message.Truncate(TRUNC);
if (ex.Message.Length > TRUNC)
errMsg += "...";
var text = @$"
The below error occurred while trying to process this book. Skip this book permanently?
@@ -354,7 +361,7 @@ The below error occurred while trying to process this book. Skip this book perma
- Click NO to skip the book this time only. We'll try again later.
Error:
{ex.Message}
{errMsg}
".Trim();
var dialogResult = System.Windows.Forms.MessageBox.Show(
text,