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
+2 -2
View File
@@ -58,8 +58,8 @@ class AppStarter:
retry_count = retry_count + 1
launch_browser(retry_count)
else:
raise Exception('Unable to start python server even after '
'retrying 60 times.')
raise RuntimeError('Unable to start python server even '
'after retrying 60 times.')
if self.driver is not None:
launch_browser(0)
+2 -2
View File
@@ -323,7 +323,7 @@ class PgadminPage:
attempts -= 1
time.sleep(.4)
if attempts == 0:
raise Exception(e)
raise e
def click_a_tree_node(self, element_name, list_of_element):
"""It will click a tree node eg. server, schema, table name etc
@@ -892,7 +892,7 @@ class PgadminPage:
except Exception as e:
time.sleep(.2)
if attempt == 2:
raise Exception(e)
raise e
# Use send keys if input_keys true, else use javascript to set content
if input_keys:
backspaces = [Keys.BACKSPACE] * len(field.get_attribute('value'))