Replace the generic exception class with a more specific one.

This commit is contained in:
Aditya Toshniwal
2020-08-07 12:37:00 +05:30
committed by Akshay Joshi
parent 68a5027d15
commit d6400bbcae
18 changed files with 46 additions and 34 deletions

View File

@@ -13,6 +13,7 @@ import sys
from flask import render_template
from flask_babelex import gettext as _
from pgadmin.utils.preferences import Preferences
from werkzeug.exceptions import InternalServerError
import config
@@ -114,7 +115,7 @@ class ServerType(object):
elif operation == 'sql':
res = 'psql'
else:
raise Exception(
raise InternalServerError(
_("Could not find the utility for the operation '%s'").format(
operation
)