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():
57
57
QUERIES_FILENAME = os .path .join (USER_FOLDER , SQLTOOLS_QUERIES_FILE )
58
58
QUERIES_FILENAME_DEFAULT = os .path .join (DEFAULT_FOLDER , SQLTOOLS_QUERIES_FILE )
59
59
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
+
61
74
queries = Storage (QUERIES_FILENAME , default = QUERIES_FILENAME_DEFAULT )
62
- connections = Settings (CONNECTIONS_FILENAME , default = CONNECTIONS_FILENAME_DEFAULT )
63
75
history = History (settings .get ('history_size' , 100 ))
64
76
65
77
Logger .setPackageVersion (__version__ )
You can’t perform that action at this time.
0 commit comments