mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Console] Use Spectre.Console to show exceptions in the CLI.
GUI still uses `ConsoleWindow`.
This commit is contained in:
@@ -38,6 +38,7 @@ using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.AaruMetadata;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Structs;
|
||||
using Aaru.Console;
|
||||
using Aaru.Helpers;
|
||||
|
||||
namespace Aaru.Images;
|
||||
@@ -82,9 +83,10 @@ public sealed partial class DriDiskCopy
|
||||
{
|
||||
_writingStream = new FileStream(path, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None);
|
||||
}
|
||||
catch(IOException e)
|
||||
catch(IOException ex)
|
||||
{
|
||||
ErrorMessage = string.Format(Localization.Could_not_create_new_image_file_exception_0, e.Message);
|
||||
ErrorMessage = string.Format(Localization.Could_not_create_new_image_file_exception_0, ex.Message);
|
||||
AaruConsole.WriteException(ex);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user