Report error exceptions
svn: r1275
This commit is contained in:
@@ -28,14 +28,6 @@
|
||||
import os
|
||||
import string
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# GNOME/GTK
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
import gtk
|
||||
import gnome.ui
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
# gramps modules
|
||||
@@ -44,6 +36,8 @@ import gnome.ui
|
||||
import Report
|
||||
import TextDoc
|
||||
import RelLib
|
||||
import Errors
|
||||
from QuestionDialog import ErrorDialog
|
||||
from intl import gettext as _
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
@@ -60,11 +54,7 @@ class AncestorReport(Report.Report):
|
||||
self.max_generations = max
|
||||
self.pgbrk = pgbrk
|
||||
self.doc = doc
|
||||
|
||||
try:
|
||||
self.doc.open(output)
|
||||
except IOError,msg:
|
||||
gnome.ui.GnomeErrorDialog(_("Could not open %s") % output + "\n" + msg)
|
||||
self.doc.open(output)
|
||||
|
||||
def filter(self,person,index):
|
||||
if person == None or index >= (1 << 30):
|
||||
@@ -277,11 +267,12 @@ class AncestorReportDialog(Report.TextReportDialog):
|
||||
MyReport = AncestorReport(self.db, self.person, self.target_path,
|
||||
self.max_gen, self.doc, self.pg_brk)
|
||||
MyReport.write_report()
|
||||
except Errors.ReportError, msg:
|
||||
ErrorDialog(str(msg))
|
||||
except:
|
||||
import DisplayTrace
|
||||
DisplayTrace.DisplayTrace()
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user