Add additional debug message

parent 15722c6a
...@@ -140,9 +140,11 @@ abstract class TyposClientInterface ...@@ -140,9 +140,11 @@ abstract class TyposClientInterface
// Trying to replace typo in text // Trying to replace typo in text
try { try {
error_log("Trying to find a typo in article text...");
$article->text = $this->replaceTypoInText($typo, $corrected, $context, $article->text); $article->text = $this->replaceTypoInText($typo, $corrected, $context, $article->text);
return; return;
} catch (\Exception $e) { } catch (\Exception $e) {
error_log($e->getMessage());
if ($e->getCode() != 404 && $e->getCode() != 405) { if ($e->getCode() != 404 && $e->getCode() != 405) {
throw $e; throw $e;
} }
...@@ -150,14 +152,17 @@ abstract class TyposClientInterface ...@@ -150,14 +152,17 @@ abstract class TyposClientInterface
// Trying to replace typo in title // Trying to replace typo in title
try { try {
error_log("Trying to find a typo in article title...");
$article->title = $this->replaceTypoInText($typo, $corrected, $context, $article->title); $article->title = $this->replaceTypoInText($typo, $corrected, $context, $article->title);
return; return;
} catch (\Exception $e) { } catch (\Exception $e) {
error_log($e->getMessage());
if ($e->getCode() != 404 && $e->getCode() != 405) { if ($e->getCode() != 404 && $e->getCode() != 405) {
throw $e; throw $e;
} }
} }
error_log("Trying to find a typo in article subtitle...");
// Trying to replace typo in subtitle // Trying to replace typo in subtitle
$article->subtitle = $this->replaceTypoInText($typo, $corrected, $context, $article->subtitle); $article->subtitle = $this->replaceTypoInText($typo, $corrected, $context, $article->subtitle);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment