diff options
author | Andres Rey <[email protected]> | 2018-01-11 20:12:20 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2018-01-11 20:12:20 +0000 |
commit | 02ac8457c66dacbe91294ce52e4d2512fc444019 (patch) | |
tree | bfbb4254055bbbb2653f067ae2a87aaebe484882 | |
parent | 8dde7dadc1f7ad79de935450c5f8418bfbe59373 (diff) | |
parent | 8ffc0f2fa1a7edea629f87597ad30f5fb2dca813 (diff) |
Merge pull request #40 from andreskrey/analysis-z372oA
Apply fixes from StyleCI
-rw-r--r-- | src/Readability.php | 2 |
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 { |