Skip to content

Commit

Permalink
Introduce a base exception class
Browse files Browse the repository at this point in the history
  • Loading branch information
Evandro Myller authored and Evandro Myller committed Jan 11, 2018
1 parent 120c579 commit e19a2f8
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions pydub/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
class PydubException(Exception):
"""
Base class for any Pydub exception
"""


class TooManyMissingFrames(Exception):
class TooManyMissingFrames(PydubException):
pass


class InvalidDuration(Exception):
class InvalidDuration(PydubException):
pass


class InvalidTag(Exception):
class InvalidTag(PydubException):
pass


class InvalidID3TagVersion(Exception):
class InvalidID3TagVersion(PydubException):
pass


class CouldntDecodeError(Exception):
class CouldntDecodeError(PydubException):
pass
class CouldntEncodeError(Exception):

class CouldntEncodeError(PydubException):
pass

class MissingAudioParameter(Exception):
pass
class MissingAudioParameter(PydubException):
pass

0 comments on commit e19a2f8

Please sign in to comment.