import sys
from werkzeug.exceptions import HTTPException
[docs]class EnvVarNotFoundError(Exception):
"""Exception raised when the needed environment variables are not set"""
def __init__(self, *var_name):
self.msg = " & ".join(*var_name) + " missing!"
def __str__(self):
return repr(self.msg)
[docs]class GetFileUpdateError(Exception):
"""Exception raised during the process of getting files to update"""
pass
[docs]class UploadError(Exception):
"""Exception raised during the process of uploading files"""
pass
[docs]class PublishError(Exception):
"""Exception raised during the process of publishing files"""
pass
[docs]def error_print():
"""Format of error printing"""
return '{}. {}, line: {}'.format(sys.exc_info()[0],
sys.exc_info()[1],
sys.exc_info()[2].tb_lineno)