Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception not raised with corrupt file #1

Open
quarklark opened this issue Jun 28, 2019 · 1 comment
Open

Exception not raised with corrupt file #1

quarklark opened this issue Jun 28, 2019 · 1 comment

Comments

@quarklark
Copy link

Seems like there's no error handling for when a file is not parsable. (It just crashes with struct.error: unpack requires a buffer of 12 bytes.) Probably would be more useful to raise an exception if the file is determined to be no good?

I'm building out an application that uses this library, and I'm trying to validate that the file is parsed correctly, and it seems a little wonky to handle it by catching this struct.error.

@nsfmc
Copy link
Owner

nsfmc commented Nov 3, 2019

Hi sorry I did not see this as my emails are usually flooded with other github notices, this one slipped through. @quarklark do you have some feelings about the nature of the exception (or even just how exception handling should be addressed here? I’m happy to collaborate or let you take the reigns on a pr if you have strong feelings) hope alls well and sorry for the delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants