Пример #1
0
    def THREADBootEverything(self):

        try:

            self.CheckAlreadyRunning()

            self._last_shutdown_was_bad = HydrusData.LastShutdownWasBad(
                self.db_dir, 'client')

            HydrusData.RecordRunningStart(self.db_dir, 'client')

            self.InitModel()

            self.InitView()

            self._is_booted = True

        except HydrusExceptions.PermissionException as e:

            HydrusData.Print(e)

            HG.emergency_exit = True

            self.Exit()

        except Exception as e:

            text = 'A serious error occurred while trying to start the program. The error will be shown next in a window. More information may have been written to client.log.'

            HydrusData.DebugPrint(
                'If the db crashed, another error may be written just above ^.'
            )
            HydrusData.DebugPrint(text)

            HydrusData.DebugPrint(traceback.format_exc())

            wx.CallAfter(wx.MessageBox, traceback.format_exc())
            wx.CallAfter(wx.MessageBox, text)

            HG.emergency_exit = True

            self.Exit()

        finally:

            self._DestroySplash()
Пример #2
0
    def THREADBootEverything(self):

        try:

            self.CheckAlreadyRunning()

            self._last_shutdown_was_bad = HydrusData.LastShutdownWasBad(
                HC.DB_DIR, 'client')

            HydrusData.RecordRunningStart(HC.DB_DIR, 'client')

            self.InitModel()

            self.InitView()

        except HydrusExceptions.PermissionException as e:

            HydrusData.Print(e)

            HydrusGlobals.emergency_exit = True

            self.Exit()

        except Exception as e:

            text = 'A serious error occured while trying to start the program. Its traceback will be shown next. It should have also been written to client.log.'

            HydrusData.DebugPrint(text)

            traceback.print_exc()

            wx.CallAfter(wx.MessageBox, traceback.format_exc())
            wx.CallAfter(wx.MessageBox, text)

            HydrusGlobals.emergency_exit = True

            self.Exit()

        finally:

            self.pub('splash_destroy')