From 0d89c3410774d1900b1a901484d7b5f690998b77 Mon Sep 17 00:00:00 2001 From: Michael Bucari-Tovo Date: Thu, 1 Jul 2021 18:01:03 -0600 Subject: [PATCH] Added try blocks. TODO: Add error logging. --- AaxDecrypter/AaxcDownloadConverter.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/AaxDecrypter/AaxcDownloadConverter.cs b/AaxDecrypter/AaxcDownloadConverter.cs index 11038eb1..23e3b882 100644 --- a/AaxDecrypter/AaxcDownloadConverter.cs +++ b/AaxDecrypter/AaxcDownloadConverter.cs @@ -211,13 +211,27 @@ namespace AaxDecrypter public bool Step5_CreateCue() { - File.WriteAllText(PathLib.ReplaceExtension(outputFileName, ".cue"), Cue.CreateContents(Path.GetFileName(outputFileName), downloadLicense.ChapterInfo)); + try + { + File.WriteAllText(PathLib.ReplaceExtension(outputFileName, ".cue"), Cue.CreateContents(Path.GetFileName(outputFileName), downloadLicense.ChapterInfo)); + } + catch (Exception ex) + { + //TODO Add log entry + } return !isCanceled; } public bool Step6_CreateNfo() { - File.WriteAllText(PathLib.ReplaceExtension(outputFileName, ".nfo"), NFO.CreateContents(AppName, aaxcTagLib, downloadLicense.ChapterInfo)); + try + { + File.WriteAllText(PathLib.ReplaceExtension(outputFileName, ".nfo"), NFO.CreateContents(AppName, aaxcTagLib, downloadLicense.ChapterInfo)); + } + catch (Exception ex) + { + //TODO Add log entry + } return !isCanceled; }