mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add and use ThrowOnError global (temp)
This commit is contained in:
@@ -192,8 +192,11 @@ namespace SabreTools.Library.IO
|
||||
loadBuffer.Dispose();
|
||||
hashers.ForEach(h => h.Dispose());
|
||||
}
|
||||
catch (IOException)
|
||||
catch (IOException ex)
|
||||
{
|
||||
if (Globals.ThrowOnError)
|
||||
throw ex;
|
||||
|
||||
return new BaseFile();
|
||||
}
|
||||
finally
|
||||
@@ -226,13 +229,17 @@ namespace SabreTools.Library.IO
|
||||
|
||||
return input.Position;
|
||||
}
|
||||
catch (NotSupportedException)
|
||||
catch (NotSupportedException ex)
|
||||
{
|
||||
Globals.Logger.Verbose("Stream does not support seeking to starting offset. Stream position not changed");
|
||||
if (Globals.ThrowOnError)
|
||||
throw ex;
|
||||
}
|
||||
catch (NotImplementedException)
|
||||
catch (NotImplementedException ex)
|
||||
{
|
||||
Globals.Logger.Warning("Stream does not support seeking to starting offset. Stream position not changed");
|
||||
if (Globals.ThrowOnError)
|
||||
throw ex;
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user