Refactor exceptions

* Suffix names for custom exceptions with "Error"
* Introduce exceptions for when the coressponding encoder isn't found
This commit is contained in:
Ritiek Malhotra
2020-03-17 03:09:56 +05:30
parent 083c430489
commit 29005f24ed
16 changed files with 276 additions and 28 deletions

View File

@@ -0,0 +1,20 @@
class EncoderNotFoundError(Exception):
__module__ = Exception.__module__
def __init__(self, message=None):
super(EncoderNotFoundError, self).__init__(message)
class FFmpegNotFoundError(EncoderNotFoundError):
__module__ = Exception.__module__
def __init__(self, message=None):
super(FFmpegNotFoundError, self).__init__(message)
class AvconvNotFoundError(EncoderNotFoundError):
__module__ = Exception.__module__
def __init__(self, message=None):
super(AvconvNotFoundError, self).__init__(message)