Source code for flask_fs.errors
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
__all__ = (
'FSError',
'FileExists',
'FileNotFound',
'UnauthorizedFileType',
'UploadNotAllowed',
'OperationNotSupported',
)
[docs]class FSError(Exception):
'''Base class for all Flask-FS Exceptions'''
pass
[docs]class UnauthorizedFileType(FSError):
'''This exception is raised when trying to upload an unauthorized file type.'''
pass
[docs]class UploadNotAllowed(FSError):
'''Raised when trying to upload into storage where upload is not allowed.'''
pass
[docs]class FileExists(FSError):
'''Raised when trying to overwrite an existing file'''
pass
[docs]class FileNotFound(FSError):
'''Raised when trying to access a non existant file'''
pass
[docs]class OperationNotSupported(FSError):
'''Raised when trying to perform an operation not supported by the current backend'''
pass