Skip to content

Commit

Permalink
Consistent exception messages between Java and .NET
Browse files Browse the repository at this point in the history
  • Loading branch information
drewnoakes committed May 7, 2021
1 parent cdf9427 commit ab4a15b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MetadataExtractor/IO/SequentialStreamReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public override void Skip(long n)
throw new ArgumentException("n must be zero or greater.");

if (_stream.Position + n > _stream.Length)
throw new IOException("Unable to skip past of end of file");
throw new IOException($"Unable to skip. Requested {n} bytes but only {_stream.Length - _stream.Position} remained.");

_stream.Seek(n, SeekOrigin.Current);
}
Expand Down

0 comments on commit ab4a15b

Please sign in to comment.