diff options
author | Andres Rey <[email protected]> | 2018-01-11 20:12:49 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2018-01-11 20:12:49 +0000 |
commit | 43155bd81bfb732c4cfe62396129d2060836bf18 (patch) | |
tree | b79aaa727a6bd549d2c9c6d580a4e13503b6d2fe /src | |
parent | e3bbc414b3bf5172732f80645e0ff78bffd50786 (diff) | |
parent | 02ac8457c66dacbe91294ce52e4d2512fc444019 (diff) |
Merge remote-tracking branch 'origin/logging' into logging
Diffstat (limited to 'src')
-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 7a61602..7291a18 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 { |