class ValidationException(Exception): pass class ConfigurationException(Exception): pass class FFmpegException(Exception): def __init__(self, inpath, outpath, maxheight, errormessage): self.inpath = inpath self.outpath = outpath self.maxheight = maxheight self.message = errormessage.decode() def __str__(self): return '\n'.join([ 'An error was encountered when transcoding.', f'Input file: {self.inpath}', f'Output file: {self.outpath}', 'Full error message below:', self.message ])