diff options
Diffstat (limited to 'lib/public/TextProcessing/Events/TaskFailedEvent.php')
-rw-r--r-- | lib/public/TextProcessing/Events/TaskFailedEvent.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/public/TextProcessing/Events/TaskFailedEvent.php b/lib/public/TextProcessing/Events/TaskFailedEvent.php new file mode 100644 index 00000000000..f9765e362dc --- /dev/null +++ b/lib/public/TextProcessing/Events/TaskFailedEvent.php @@ -0,0 +1,30 @@ +<?php + +namespace OCP\TextProcessing\Events; + +use OCP\TextProcessing\Task; + +/** + * @since 27.1.0 + */ +class TaskFailedEvent extends AbstractTextProcessingEvent { + /** + * @param Task $task + * @param string $errorMessage + * @since 27.1.0 + */ + public function __construct( + Task $task, + private string $errorMessage, + ) { + parent::__construct($task); + } + + /** + * @return string + * @since 27.1.0 + */ + public function getErrorMessage(): string { + return $this->errorMessage; + } +} |