mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Consolidate some of the throws
This commit is contained in:
@@ -189,9 +189,7 @@ namespace SabreTools.Library.IO
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (Globals.ThrowOnError)
|
||||
throw ex;
|
||||
|
||||
Globals.Logger.Warning(ex, $"An exception occurred trying to figure out the format of '{filename}'");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -303,9 +301,7 @@ namespace SabreTools.Library.IO
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Don't log file open errors
|
||||
if (Globals.ThrowOnError)
|
||||
throw ex;
|
||||
Globals.Logger.Warning(ex, $"An exception occurred determining file type of '{input}'");
|
||||
}
|
||||
|
||||
return outFileType;
|
||||
|
||||
Reference in New Issue
Block a user