LLM OCP API: Simplify TaskBackgroundJob#run catch block

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2023-07-07 11:46:31 +02:00
parent e810a8b66b
commit 9ccc65d68c

View file

@ -56,7 +56,7 @@ class TaskBackgroundJob extends QueuedJob {
try {
$this->languageModelManager->runTask($task);
$event = new TaskSuccessfulEvent($task);
} catch (\RuntimeException|PreConditionNotMetException|\Throwable $e) {
} catch (\Throwable $e) {
$event = new TaskFailedEvent($task, $e->getMessage());
}
$this->eventDispatcher->dispatchTyped($event);