This repository was archived by the owner on Mar 12, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -57,9 +57,21 @@ def startPlugin():
5757 QUERIES_FILENAME = os .path .join (USER_FOLDER , SQLTOOLS_QUERIES_FILE )
5858 QUERIES_FILENAME_DEFAULT = os .path .join (DEFAULT_FOLDER , SQLTOOLS_QUERIES_FILE )
5959
60- settings = Settings (SETTINGS_FILENAME , default = SETTINGS_FILENAME_DEFAULT )
60+ try :
61+ settings = Settings (SETTINGS_FILENAME , default = SETTINGS_FILENAME_DEFAULT )
62+ except Exception as e :
63+ msg = __package__ + ": Failed to parse " + SQLTOOLS_SETTINGS_FILE + " file"
64+ print (msg + "\n Error: " + str (e ))
65+ Window ().status_message (msg )
66+
67+ try :
68+ connections = Settings (CONNECTIONS_FILENAME , default = CONNECTIONS_FILENAME_DEFAULT )
69+ except Exception as e :
70+ msg = __package__ + ": Failed to parse " + SQLTOOLS_CONNECTIONS_FILE + " file"
71+ print (msg + "\n Error: " + str (e ))
72+ Window ().status_message (msg )
73+
6174 queries = Storage (QUERIES_FILENAME , default = QUERIES_FILENAME_DEFAULT )
62- connections = Settings (CONNECTIONS_FILENAME , default = CONNECTIONS_FILENAME_DEFAULT )
6375 history = History (settings .get ('history_size' , 100 ))
6476
6577 Logger .setPackageVersion (__version__ )
You can’t perform that action at this time.
0 commit comments