add log and try catch
This commit is contained in:
parent
410ba6f6ca
commit
da8f36730c
|
|
@ -32,12 +32,19 @@ class TelegramLinkFixerExtension extends Minz_Extension
|
||||||
return; // skip if not a telegram link
|
return; // skip if not a telegram link
|
||||||
}
|
}
|
||||||
|
|
||||||
$description = $entry->description();
|
try {
|
||||||
if (empty($description)) {
|
// output the $entry
|
||||||
error_log('TelegramLinkFixer: Skipping - empty description');
|
error_log('TelegramLinkFixer: Entry: ' . json_encode($entry));
|
||||||
return;
|
$description = $entry->description();
|
||||||
|
if (empty($description)) {
|
||||||
|
error_log('TelegramLinkFixer: Skipping - empty description');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
error_log('TelegramLinkFixer: Error processing entry: ' . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Look specifically for Telegraph links
|
// Look specifically for Telegraph links
|
||||||
error_log('TelegramLinkFixer: Looking for Telegraph link in description: ' . $description);
|
error_log('TelegramLinkFixer: Looking for Telegraph link in description: ' . $description);
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue