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

poor error message from ffmpeg_reader.py #157

Merged
merged 1 commit into from Apr 15, 2015
Merged

Conversation

ryanfox
Copy link
Collaborator

@ryanfox ryanfox commented Apr 15, 2015

Per http://stackoverflow.com/questions/11497234/typeerrorexceptions-must-be-old-style-classes-or-derived-from-baseexception-no, as of python 2.6, you can't raise just a string. If this particular error is triggered, you just get a message

{TypeError} exceptions must be old-style classes or derived from BaseException, not unicode

The nearby exceptions are IOErrors, so I made this one an IOError as well. Now it shows the real exception, instead of the cryptic message above.

Per [http://stackoverflow.com/questions/11497234/typeerrorexceptions-must-be-old-style-classes-or-derived-from-baseexception-no](http://stackoverflow.com/questions/11497234/typeerrorexceptions-must-be-old-style-classes-or-derived-from-baseexception-no), as of python 2.6, you can't raise just a string.  If this particular error is triggered, you just get a message

    {TypeError} exceptions must be old-style classes or derived from BaseException, not unicode

The nearby exceptions are IOErrors, so I made this one an IOError as well.  Now it shows the real exception, instead of the cryptic message above.
@ryanfox
Copy link
Collaborator Author

ryanfox commented Apr 15, 2015

For what it's worth, I'm using python 2.7.6 on 64-bit Linux.

Zulko added a commit that referenced this pull request Apr 15, 2015
poor error message from ffmpeg_reader.py
@Zulko Zulko merged commit abca1ce into Zulko:master Apr 15, 2015
@Zulko
Copy link
Owner

Zulko commented Apr 15, 2015

Thanks !

@ryanfox ryanfox deleted the patch-1 branch April 15, 2015 17:46
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.

None yet

2 participants