Skip to content

Commit 743edf3

Browse files
marcelklehrAndyScherzinger
authored andcommitted
fix: Use ProcessingException
instead of UserFacingProcessing Exception which is not in nc < 33 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent c0a35cc commit 743edf3

1 file changed

Lines changed: 5 additions & 10 deletions

File tree

lib/private/TaskProcessing/Manager.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -336,19 +336,14 @@ public function process(?string $userId, array $input, callable $reportProgress)
336336
$folder = $this->appData->newFolder('text2image');
337337
}
338338
if ($input['numberOfImages'] > 12) {
339-
throw new UserFacingProcessingException(
340-
'numberOfImages cannot be greater than 12',
341-
userFacingMessage:
342-
$this->l10nFactory->get('core', $this->l10nFactory->getUserLanguage($this->userManager->get($userId)))
343-
->t('Cannot generate more than 12 images')
339+
throw new ProcessingException(
340+
'numberOfImages cannot be greater than 12'
344341
);
345342
}
346343
if ($input['numberOfImages'] < 1) {
347-
throw new UserFacingProcessingException(
348-
'numberOfImages must be greater than 0',
349-
userFacingMessage:
350-
$this->l10nFactory->get('core', $this->l10nFactory->getUserLanguage($this->userManager->get($userId)))
351-
->t('Cannot generate less than 1 image'));
344+
throw new ProcessingException(
345+
'numberOfImages must be greater than 0'
346+
);
352347
}
353348
$resources = [];
354349
$files = [];

0 commit comments

Comments
 (0)