Give a descriptive first error line on startup crash, which are probably due to bad view
svn: r20392
This commit is contained in:
parent
ebf197ad8e
commit
bbd1617d66
@ -329,7 +329,14 @@ def __startgramps(errors, argparser):
|
|||||||
except:
|
except:
|
||||||
quit_now = True
|
quit_now = True
|
||||||
exit_code = 1
|
exit_code = 1
|
||||||
LOG.error("Gramps failed to start.", exc_info=True)
|
LOG.error(_(
|
||||||
|
"\nGramps failed to start. Please report a bug about this.\n"
|
||||||
|
"This could be because of an error in a (third party) View on startup.\n"
|
||||||
|
"To use another view, don't load a family tree, change view, and then load"
|
||||||
|
" your family tree.\n"
|
||||||
|
"You can also change manually the startup view in the gramps.ini file \n"
|
||||||
|
"by changing the last-view parameter.\n"
|
||||||
|
), exc_info=True)
|
||||||
|
|
||||||
if quit_now:
|
if quit_now:
|
||||||
#stop gtk loop and quit
|
#stop gtk loop and quit
|
||||||
|
@ -38,14 +38,12 @@ class GtkHandler(logging.Handler):
|
|||||||
logging.Handler.__init__(self)
|
logging.Handler.__init__(self)
|
||||||
self._rotate_handler = rotate_handler
|
self._rotate_handler = rotate_handler
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def emit(self, record):
|
def emit(self, record):
|
||||||
"""
|
"""
|
||||||
Add the record to the rotating buffer.
|
Add the record to the rotating buffer.
|
||||||
"""
|
"""
|
||||||
self._record = record
|
self._record = record
|
||||||
ErrorView(error_detail=self,rotate_handler=self._rotate_handler)
|
ErrorView(error_detail=self, rotate_handler=self._rotate_handler)
|
||||||
|
|
||||||
def get_formatted_log(self):
|
def get_formatted_log(self):
|
||||||
return self.format(self._record)
|
return self.format(self._record)
|
||||||
|
Loading…
Reference in New Issue
Block a user