1
0

TaskFailedEvent.php 612 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCP\TextProcessing\Events;
  7. use OCP\TextProcessing\Task;
  8. /**
  9. * @since 27.1.0
  10. */
  11. class TaskFailedEvent extends AbstractTextProcessingEvent {
  12. /**
  13. * @param Task $task
  14. * @param string $errorMessage
  15. * @since 27.1.0
  16. */
  17. public function __construct(
  18. Task $task,
  19. private string $errorMessage,
  20. ) {
  21. parent::__construct($task);
  22. }
  23. /**
  24. * @return string
  25. * @since 27.1.0
  26. */
  27. public function getErrorMessage(): string {
  28. return $this->errorMessage;
  29. }
  30. }