37 mainWindow = None |
37 mainWindow = None |
38 splash = None |
38 splash = None |
39 |
39 |
40 # generate list of arguments to be remembered for a restart |
40 # generate list of arguments to be remembered for a restart |
41 restartArgsList = ["--nosplash", "--plugin", "--debug", "--config"] |
41 restartArgsList = ["--nosplash", "--plugin", "--debug", "--config"] |
42 restartArgs = [arg for arg in sys.argv[1:] |
42 restartArgs = [arg for arg in sys.argv[1:] |
43 if arg.split("=", 1)[0] in restartArgsList] |
43 if arg.split("=", 1)[0] in restartArgsList] |
44 |
44 |
45 if "--debug" in sys.argv: |
45 if "--debug" in sys.argv: |
46 del sys.argv[sys.argv.index("--debug")] |
46 del sys.argv[sys.argv.index("--debug")] |
47 logging.basicConfig(level=logging.DEBUG) |
47 logging.basicConfig(level=logging.DEBUG) |
108 logFile = os.path.join(Globals.getConfigDir(), "eric5_error.log") |
108 logFile = os.path.join(Globals.getConfigDir(), "eric5_error.log") |
109 notice = \ |
109 notice = \ |
110 """An unhandled exception occurred. Please report the problem\n"""\ |
110 """An unhandled exception occurred. Please report the problem\n"""\ |
111 """using the error reporting dialog or via email to <{0}>.\n"""\ |
111 """using the error reporting dialog or via email to <{0}>.\n"""\ |
112 """A log has been written to "{1}".\n\nError information:\n""".format( |
112 """A log has been written to "{1}".\n\nError information:\n""".format( |
113 BugAddress, logFile) |
113 BugAddress, logFile) |
114 timeString = time.strftime("%Y-%m-%d, %H:%M:%S") |
114 timeString = time.strftime("%Y-%m-%d, %H:%M:%S") |
115 |
115 |
116 versionInfo = "\n{0}\n{1}".format( |
116 versionInfo = "\n{0}\n{1}".format( |
117 separator, Utilities.generateVersionInfo()) |
117 separator, Utilities.generateVersionInfo()) |
118 pluginVersionInfo = Utilities.generatePluginsVersionInfo() |
118 pluginVersionInfo = Utilities.generatePluginsVersionInfo() |
171 |
171 |
172 global args, mainWindow, splash, restartArgs |
172 global args, mainWindow, splash, restartArgs |
173 |
173 |
174 sys.excepthook = excepthook |
174 sys.excepthook = excepthook |
175 |
175 |
176 options = [\ |
176 options = [ |
177 ("--config=configDir", |
177 ("--config=configDir", |
178 "use the given directory as the one containing the config files"), |
178 "use the given directory as the one containing the config files"), |
179 ("--debug", "activate debugging output to the console"), |
179 ("--debug", "activate debugging output to the console"), |
180 ("--nosplash", "don't show the splash screen"), |
180 ("--nosplash", "don't show the splash screen"), |
181 ("--noopen", |
181 ("--noopen", |