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:
@@ -41,6 +41,7 @@ using Aaru.CommonTypes.AaruMetadata;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
using Aaru.CommonTypes.Structs;
|
||||
using Aaru.Console;
|
||||
using Aaru.Helpers;
|
||||
using Marshal = Aaru.Helpers.Marshal;
|
||||
|
||||
@@ -507,9 +508,10 @@ public class SegaMegaDrive : IByteAddressableImage
|
||||
{
|
||||
_dataStream = 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 ErrorNumber.InOutError;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user