2023-06-15 07:22:16 -04:00
|
|
|
<?php
|
|
|
|
|
|
2024-05-23 03:26:56 -04:00
|
|
|
/**
|
|
|
|
|
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
*/
|
2023-07-14 09:59:50 -04:00
|
|
|
namespace OCP\TextProcessing\Events;
|
2023-06-15 07:22:16 -04:00
|
|
|
|
2023-07-14 09:59:50 -04:00
|
|
|
use OCP\TextProcessing\Task;
|
2023-06-15 07:22:16 -04:00
|
|
|
|
|
|
|
|
/**
|
2023-07-07 07:46:03 -04:00
|
|
|
* @since 27.1.0
|
2024-07-26 05:20:46 -04:00
|
|
|
* @deprecated 30.0.0
|
2023-06-15 07:22:16 -04:00
|
|
|
*/
|
2023-07-14 09:59:50 -04:00
|
|
|
class TaskFailedEvent extends AbstractTextProcessingEvent {
|
2023-06-20 12:26:29 -04:00
|
|
|
/**
|
2023-07-14 09:59:50 -04:00
|
|
|
* @param Task $task
|
2023-06-20 12:26:29 -04:00
|
|
|
* @param string $errorMessage
|
2023-07-07 07:46:03 -04:00
|
|
|
* @since 27.1.0
|
2023-06-20 12:26:29 -04:00
|
|
|
*/
|
2023-07-07 05:54:23 -04:00
|
|
|
public function __construct(
|
2023-07-14 09:59:50 -04:00
|
|
|
Task $task,
|
2023-07-07 05:54:23 -04:00
|
|
|
private string $errorMessage,
|
|
|
|
|
) {
|
2023-06-15 07:22:16 -04:00
|
|
|
parent::__construct($task);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
2023-07-07 07:46:03 -04:00
|
|
|
* @since 27.1.0
|
2023-06-15 07:22:16 -04:00
|
|
|
*/
|
|
|
|
|
public function getErrorMessage(): string {
|
|
|
|
|
return $this->errorMessage;
|
|
|
|
|
}
|
|
|
|
|
}
|