diff --git a/python/plugins/db_manager/db_plugins/postgis/connector.py b/python/plugins/db_manager/db_plugins/postgis/connector.py index a696316ef4c..afe4ae3fc3f 100644 --- a/python/plugins/db_manager/db_plugins/postgis/connector.py +++ b/python/plugins/db_manager/db_plugins/postgis/connector.py @@ -1018,7 +1018,7 @@ class PostGisDBConnector(DBConnector): if len(view_name_parts) > 2: # Raise an error when more than one period is used. - raise ValueError("Invalid view name: Please use the format 'schema.viewname', or enter only the viewname for the public schema.") + raise DbError("Invalid view name: Please use the format 'schema.viewname', or enter only the viewname for the public schema.") elif len(view_name_parts) == 2: # To allow view creation into specified schema schema, view_name = view_name_parts sql = "CREATE VIEW %s AS %s" % (self.quoteId([schema, view_name]), query)