Skip to content

Wrapped getUnit8() in a try...catch#11

Open
wyqydsyq wants to merge 1 commit into43081j:masterfrom
wyqydsyq:patch-1
Open

Wrapped getUnit8() in a try...catch#11
wyqydsyq wants to merge 1 commit into43081j:masterfrom
wyqydsyq:patch-1

Conversation

@wyqydsyq
Copy link

Wrapping this if clause in a try...catch seems to alleviate the issue found in #10 and possibly #9

There seems to be no real negative impact in simply ignoring any exceptions generated by the tried code, the resulting tags seems to be completely fine, though a more graceful method of handling the exception should probably be implemented.

Wrapping this `if` clause in a `try...catch` seems to alleviate the issue found in #10 and possibly #9

There seems to be no real negative impact in simply ignoring any exceptions generated by the tried code, the resulting `tags` seems to be completely fine.
@ntuckerxx
Copy link

I've had the best results by wrapping the entire call to ID3Frame.parse in an exception handler, as there seem to be a handful of assumptions in there that don't hold for all files I've encountered. You can ignore frames that fail to parse and still process the rest of the file.

@osmihi
Copy link

osmihi commented Aug 7, 2014

I came here to propose the exact same change. Catching the exception here avoids unnecessarily failing the whole process due to one small problem in the tag. I agree that there may ultimately be a better place or additional places to put such a change, though.

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

Successfully merging this pull request may close these issues.

3 participants