summaryrefslogtreecommitdiff
path: root/src/Readability.php
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2018-01-11 20:12:05 +0000
committerStyleCI Bot <[email protected]>2018-01-11 20:12:05 +0000
commit8ffc0f2fa1a7edea629f87597ad30f5fb2dca813 (patch)
treebfbb4254055bbbb2653f067ae2a87aaebe484882 /src/Readability.php
parent8dde7dadc1f7ad79de935450c5f8418bfbe59373 (diff)
Apply fixes from StyleCI
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 {