Skip to content

Commit e704bd5

Browse files
committed
chore: log when get error
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 85fefe2 commit e704bd5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/Service/ReminderService.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use OCP\BackgroundJob\IJobList;
1919
use OCP\IAppConfig;
2020
use OCP\IDateTimeZone;
21+
use Psr\Log\LoggerInterface;
2122

2223
class ReminderService {
2324
public function __construct(
@@ -27,6 +28,7 @@ public function __construct(
2728
protected ITimeFactory $time,
2829
protected SignRequestMapper $signRequestMapper,
2930
protected IdentifyMethodService $identifyMethodService,
31+
protected LoggerInterface $logger,
3032
) {
3133
}
3234

@@ -142,7 +144,8 @@ protected function getStartTime(string $startTime): ?\DateTime {
142144

143145
try {
144146
$time = new \DateTime($startTime, $timezone);
145-
} catch (DateMalformedStringException) {
147+
} catch (DateMalformedStringException $e) {
148+
$this->logger->error('Failed to parse reminder send time: ' . $e->getMessage());
146149
return null;
147150
}
148151
$dateTime->setTime((int)$time->format('G'), (int)$time->format('i'));

0 commit comments

Comments
 (0)