aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller/TextToImageApiController.php
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2023-10-26 11:16:15 +0200
committerMarcel Klehr <mklehr@gmx.net>2023-10-26 11:16:15 +0200
commit47e13cd55b3e369629b8b15a9332f50102ac076c (patch)
treee39e93345d5fca54c4a12dd3c17c57ebf6101b0c /core/Controller/TextToImageApiController.php
parent8339b5b12857b2fc3a25b289cb063a90499d0da3 (diff)
downloadnextcloud-server-47e13cd55b3e369629b8b15a9332f50102ac076c.tar.gz
nextcloud-server-47e13cd55b3e369629b8b15a9332f50102ac076c.zip
en(TextToImage): Use specific exception class instead of generic RuntimeException
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'core/Controller/TextToImageApiController.php')
-rw-r--r--core/Controller/TextToImageApiController.php3
1 files changed, 2 insertions, 1 deletions
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
}