diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..69cb7601 --- /dev/null +++ b/codecov.yml @@ -0,0 +1 @@ +comment: false diff --git a/flask_mongoengine/__init__.py b/flask_mongoengine/__init__.py index d917aa65..06b161f8 100644 --- a/flask_mongoengine/__init__.py +++ b/flask_mongoengine/__init__.py @@ -104,7 +104,7 @@ def __init__(self, app=None, config=None): def init_app(self, app, config=None): if not app or not isinstance(app, Flask): - raise Exception("Invalid Flask application instance") + raise TypeError("Invalid Flask application instance") self.app = app @@ -119,7 +119,7 @@ def init_app(self, app, config=None): if self in app.extensions["mongoengine"]: # Raise an exception if extension already initialized as # potentially new configuration would not be loaded. - raise Exception("Extension already initialized") + raise ValueError("Extension already initialized") if not config: # If not passed a config then we read the connection settings