TaskFailedEvent.php 484 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace OCP\TextProcessing\Events;
  3. use OCP\TextProcessing\Task;
  4. /**
  5. * @since 27.1.0
  6. */
  7. class TaskFailedEvent extends AbstractTextProcessingEvent {
  8. /**
  9. * @param Task $task
  10. * @param string $errorMessage
  11. * @since 27.1.0
  12. */
  13. public function __construct(
  14. Task $task,
  15. private string $errorMessage,
  16. ) {
  17. parent::__construct($task);
  18. }
  19. /**
  20. * @return string
  21. * @since 27.1.0
  22. */
  23. public function getErrorMessage(): string {
  24. return $this->errorMessage;
  25. }
  26. }