drewnoakes/metadata-extractor-dotnet
Implement TgaHeaderReader.TryExtract to not use exceptions as information
開放
#297 建立於 2021年6月7日
help wanted
倉庫指標
- 星標
- (1,059 顆星)
- PR 合併指標
- (平均合併 11小時 24分鐘) (30 天內合併 1 個 PR)
描述
The current implementation of TgaHeaderReader.TryExtract returns false from a catch block. It should, instead, use return values to indicate when extraction failed.
This is more relevant than it may seem at first, as the FileTypeDetector infrastructure uses this code path to detect whether a file is TGA or not (there is no easy way to detect TGA, so we just attempt an extraction). For bulk file processing, this exception can occur regularly. This makes debugging annoying, and can hurt performance.