diff --git a/lib/stateManagement/openFiles/types/WtaWtpData.dart b/lib/stateManagement/openFiles/types/WtaWtpData.dart index 454ea0e..03382a3 100644 --- a/lib/stateManagement/openFiles/types/WtaWtpData.dart +++ b/lib/stateManagement/openFiles/types/WtaWtpData.dart @@ -49,13 +49,13 @@ class WtaWtpData extends OpenFileData { else { wtpPath = join(datDir, wtpName); if (!await File(wtpPath!).exists()) { - showToast("Can't find corresponding WTP file"); - throw Exception("Can't find corresponding WTP file"); + showToast("Can't find corresponding WTP file for $wtaName.wta in ${dttDir ?? datDir}"); + throw Exception("Can't find corresponding WTP file for $wtaName"); } } } if (!isWtb && wtpPath == null) { - showToast("Can't find corresponding WTP file"); + showToast("Can't find corresponding WTP file in ${dttDir ?? datDir}"); throw Exception("Can't find corresponding WTP file in ${dttDir ?? datDir}"); } diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index c4be45a..368f32a 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -599,7 +599,12 @@ Future exportDat(String datFolder, { bool checkForNesting = false }) async } } var datExportPath = join(datExportDir, datName); - await repackDat(datFolder, datExportPath); + try { + await repackDat(datFolder, datExportPath); + } catch (e) { + messageLog.add("Failed to export $datName: $e"); + rethrow; + } if (recursive) await exportDat(datExportDir, checkForNesting: true);