Skip to content

Commit

Permalink
Merge pull request #244 from 7ws/emyller/base-exception
Browse files Browse the repository at this point in the history
Introduce a base exception class
  • Loading branch information
jiaaro authored Jan 12, 2018
2 parents 120c579 + 042253a commit 0d8d594
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
3 changes: 3 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,6 @@ Marcio Mazza

Sungsu Lim
github: proflim

Evandro Myller
github: emyller
24 changes: 15 additions & 9 deletions pydub/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
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 0d8d594

Please sign in to comment.