From 47e13cd55b3e369629b8b15a9332f50102ac076c Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 26 Oct 2023 11:16:15 +0200 Subject: en(TextToImage): Use specific exception class instead of generic RuntimeException Signed-off-by: Marcel Klehr --- core/Controller/TextToImageApiController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/Controller/TextToImageApiController.php') diff --git a/core/Controller/TextToImageApiController.php b/core/Controller/TextToImageApiController.php index 27833c0035d..45443347ee0 100644 --- a/core/Controller/TextToImageApiController.php +++ b/core/Controller/TextToImageApiController.php @@ -40,6 +40,7 @@ use OCP\DB\Exception; use OCP\Files\NotFoundException; use OCP\IL10N; use OCP\IRequest; +use OCP\TextToImage\Exception\TaskFailureException; use OCP\TextToImage\Exception\TaskNotFoundException; use OCP\TextToImage\Task; use OCP\TextToImage\IManager; @@ -95,7 +96,7 @@ class TextToImageApiController extends \OCP\AppFramework\OCSController { try { try { $this->textToImageManager->runOrScheduleTask($task); - } catch (\RuntimeException) { + } catch (TaskFailureException) { // noop } -- cgit v1.2.3