diff --git a/gramps/plugins/graph/gvfamilylines.py b/gramps/plugins/graph/gvfamilylines.py index 006cd4fb5..5d48734d2 100644 --- a/gramps/plugins/graph/gvfamilylines.py +++ b/gramps/plugins/graph/gvfamilylines.py @@ -63,6 +63,7 @@ from gramps.gen.plug.menu import (NumberOption, ColorOption, BooleanOption, from gramps.gen.utils.db import get_birth_or_fallback, get_death_or_fallback from gramps.gen.utils.location import get_main_location from gramps.gen.proxy import CacheProxyDb +from gramps.gen.errors import ReportError #------------------------------------------------------------------------ # @@ -370,8 +371,8 @@ class FamilyLinesReport(Report): # entire list right now and not have to deal with it ever again self._interest_set = set() if not self._gidlist: - self._user.warn(_('Empty report'), - _('You did not specify anybody')) + raise ReportError(_('Empty report'), + _('You did not specify anybody')) for gid in self._gidlist.split(): person = self._db.get_person_from_gramps_id(gid) if person: diff --git a/gramps/plugins/graph/gvrelgraph.py b/gramps/plugins/graph/gvrelgraph.py index 6ed4d3d32..0767e3b5f 100644 --- a/gramps/plugins/graph/gvrelgraph.py +++ b/gramps/plugins/graph/gvrelgraph.py @@ -61,6 +61,7 @@ from gramps.gen.relationship import get_relationship_calculator from gramps.gen.utils.db import get_birth_or_fallback, get_death_or_fallback from gramps.gen.display.place import displayer as _pd from gramps.gen.proxy import CacheProxyDb +from gramps.gen.errors import ReportError #------------------------------------------------------------------------ # @@ -174,6 +175,8 @@ class RelGraphReport(Report): pid = get_value('pid') self.center_person = self._db.get_person_from_gramps_id(pid) + if self.center_person is None: + raise ReportError(_("Person %s is not in the Database") % pid) self.increlname = get_value('increlname') if self.increlname: diff --git a/gramps/plugins/textreport/familygroup.py b/gramps/plugins/textreport/familygroup.py index 02bf24f6c..d6b44ade3 100644 --- a/gramps/plugins/textreport/familygroup.py +++ b/gramps/plugins/textreport/familygroup.py @@ -50,6 +50,7 @@ from gramps.gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, INDEX_TYPE_TOC, PARA_ALIGN_CENTER) from gramps.gen.display.place import displayer as _pd from gramps.gen.proxy import CacheProxyDb +from gramps.gen.errors import ReportError #------------------------------------------------------------------------ # @@ -671,9 +672,8 @@ class FamilyGroup(Report): self.doc.page_break() step() else: - self.doc.start_paragraph('FGR-Title') - self.doc.write_text(self._("Family Group Report")) - self.doc.end_paragraph() + raise ReportError(_('Empty report'), + _('You did not specify anybody')) #------------------------------------------------------------------------ # diff --git a/gramps/plugins/textreport/indivcomplete.py b/gramps/plugins/textreport/indivcomplete.py index 25d2ab855..2d9a9f8fc 100644 --- a/gramps/plugins/textreport/indivcomplete.py +++ b/gramps/plugins/textreport/indivcomplete.py @@ -60,6 +60,7 @@ from gramps.gen.utils.file import media_path_full from gramps.gen.utils.lds import TEMPLES from gramps.gen.proxy import CacheProxyDb from gramps.gen.relationship import get_relationship_calculator +from gramps.gen.errors import ReportError #------------------------------------------------------------------------ # @@ -807,6 +808,9 @@ class IndivCompleteReport(Report): ind_list = self.filter.apply(self._db, plist) else: ind_list = plist + if not ind_list: + raise ReportError(_('Empty report'), + _('You did not specify anybody')) for count, person_handle in enumerate(ind_list): self.person = self._db.get_person_from_handle(person_handle)