From 53fc77ac5d0668678251c2a7e71ba4cfd337932a Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Fri, 1 Sep 2017 01:21:52 +0200 Subject: [PATCH] Inherit InvalidDocument and InvalidData from DiscoveryError --- lib/diaspora_federation/discovery/exceptions.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/diaspora_federation/discovery/exceptions.rb b/lib/diaspora_federation/discovery/exceptions.rb index 38c536a..caba207 100644 --- a/lib/diaspora_federation/discovery/exceptions.rb +++ b/lib/diaspora_federation/discovery/exceptions.rb @@ -1,7 +1,11 @@ module DiasporaFederation module Discovery + # Raised, if there is an error while discover a new person + class DiscoveryError < RuntimeError + end + # Raised, if the XML structure is invalid - class InvalidDocument < RuntimeError + class InvalidDocument < DiscoveryError end # Raised, if something is wrong with the webfinger data @@ -9,11 +13,7 @@ module DiasporaFederation # * if the +webfinger_url+ is missing or malformed in {HostMeta.from_base_url} or {HostMeta.from_xml} # * if the parsed XML from {WebFinger.from_xml} is incomplete # * if the html passed to {HCard.from_html} in some way is malformed, invalid or incomplete. - class InvalidData < RuntimeError - end - - # Raised, if there is an error while discover a new person - class DiscoveryError < RuntimeError + class InvalidData < DiscoveryError end end end