TaskFailedEvent.php 634 B

1234567891011121314151617181920212223242526272829303132333435
  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. * @deprecated 30.0.0
  11. */
  12. class TaskFailedEvent extends AbstractTextProcessingEvent {
  13. /**
  14. * @param Task $task
  15. * @param string $errorMessage
  16. * @since 27.1.0
  17. */
  18. public function __construct(
  19. Task $task,
  20. private string $errorMessage,
  21. ) {
  22. parent::__construct($task);
  23. }
  24. /**
  25. * @return string
  26. * @since 27.1.0
  27. */
  28. public function getErrorMessage(): string {
  29. return $this->errorMessage;
  30. }
  31. }