File size: 445 Bytes
19c8b95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import sys
import logging
from ._logger import setup_custom_logger

logger = setup_custom_logger("ffmpeg_normalize")


class FFmpegNormalizeError(Exception):
    def __init__(self, message):
        super(FFmpegNormalizeError, self).__init__(message)
        if logger.getEffectiveLevel() == logging.DEBUG:
            logger.error(f"{self.__class__.__name__}: {message}")
        else:
            logger.error(message)
            sys.exit(1)