Skip to content

Commit

Permalink
Improve exception when trying to load an invalid file
Browse files Browse the repository at this point in the history
  • Loading branch information
jmairboeck committed Aug 28, 2023
1 parent 2a5b23d commit 41f673e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion HVIFControl/HVIFControl.vb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Public Class HVIFControl
Dim buffer = File.ReadAllBytes(value)
Dim magic = BitConverter.ToInt32(buffer, 0)
If magic <> &H6669636E Then
Throw New Exception()
Throw New FormatException("The icon is not in HVIF format")
End If
Dim styleCount = buffer(4)
Dim offset = 5
Expand Down

0 comments on commit 41f673e

Please sign in to comment.