use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\Job;
use Psr\Log\LoggerInterface;
-use Throwable;
class ScheduledNotifications extends Job {
public function __construct(
$this->reminderService->send($reminder);
} catch (DoesNotExistException $e) {
$this->logger->debug('Could not send notification for reminder with id ' . $reminder->getId());
- } catch (Throwable $th) {
- $this->logger->error($th->getMessage(), $th->getTrace());
}
}
}
use OCP\IRequest;
use OCP\IUserSession;
use Psr\Log\LoggerInterface;
-use Throwable;
class ApiController extends OCSController {
public function __construct(
'dueDate' => null,
];
return new DataResponse($reminderData, Http::STATUS_OK);
- } catch (Throwable $th) {
- $this->logger->error($th->getMessage(), ['exception' => $th]);
- return new DataResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
}
}
return new DataResponse([], Http::STATUS_OK);
} catch (NodeNotFoundException $e) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
- } catch (Throwable $th) {
- $this->logger->error($th->getMessage(), ['exception' => $th]);
- return new DataResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
}
}
return new DataResponse([], Http::STATUS_OK);
} catch (DoesNotExistException $e) {
return new DataResponse([], Http::STATUS_NOT_FOUND);
- } catch (Throwable $th) {
- $this->logger->error($th->getMessage(), ['exception' => $th]);
- return new DataResponse([], Http::STATUS_INTERNAL_SERVER_ERROR);
}
}
}