summaryrefslogtreecommitdiff
path: root/src/Readability.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Readability.php')
-rw-r--r--src/Readability.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Readability.php b/src/Readability.php
index 7160fbe..784d37d 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -131,6 +131,7 @@ class Readability
// Checking for minimum HTML to work with.
if (!($root = $this->dom->getElementsByTagName('body')->item(0)) || !$root->firstChild) {
$this->logger->emergency('No body tag present or body tag empty');
+
throw new ParseException('Invalid or incomplete HTML.');
}
@@ -176,6 +177,7 @@ class Readability
$this->configuration->setCleanConditionally(false);
} else {
$this->logger->emergency('[Parsing] Could not parse text, giving up :(');
+
throw new ParseException('Could not parse text.');
}
} else {