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:
@@ -72,22 +72,16 @@ namespace SabreTools.Library.FileTypes
|
||||
catch (EndOfStreamException ex)
|
||||
{
|
||||
// Catch this but don't count it as an error because SharpCompress is unsafe
|
||||
if (Globals.ThrowOnError)
|
||||
throw ex;
|
||||
Globals.Logger.Verbose(ex);
|
||||
}
|
||||
catch (InvalidOperationException ex)
|
||||
{
|
||||
if (Globals.ThrowOnError)
|
||||
throw ex;
|
||||
|
||||
Globals.Logger.Warning(ex);
|
||||
encounteredErrors = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Globals.Logger.Error(ex);
|
||||
if (Globals.ThrowOnError)
|
||||
throw ex;
|
||||
|
||||
encounteredErrors = true;
|
||||
}
|
||||
|
||||
@@ -173,9 +167,6 @@ namespace SabreTools.Library.FileTypes
|
||||
catch (Exception ex)
|
||||
{
|
||||
Globals.Logger.Error(ex);
|
||||
if (Globals.ThrowOnError)
|
||||
throw ex;
|
||||
|
||||
ms = null;
|
||||
realEntry = null;
|
||||
}
|
||||
@@ -242,9 +233,6 @@ namespace SabreTools.Library.FileTypes
|
||||
catch (Exception ex)
|
||||
{
|
||||
Globals.Logger.Error(ex);
|
||||
if (Globals.ThrowOnError)
|
||||
throw ex;
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user