DOES::getErrorCodeByTasksException

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. DOES
  4. getErrorCodeByTasksException
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/dispatcher.php
  • Класс: BitrixTasksDOES
  • Вызов: DOES::getErrorCodeByTasksException
static function getErrorCodeByTasksException($e)
{
	$result = false;

	if($e instanceof TasksException)
	{
		if($e->checkOfType(TasksException::TE_ACTION_FAILED_TO_BE_PROCESSED))
		{
			$result = 'ACTION_FAILED';
		}
		elseif($e->checkOfType(TasksException::TE_ACTION_NOT_ALLOWED)) // DO NOT relocate this ...
		{
			$result = 'ACTION_NOT_ALLOWED';
		}
		elseif($e->checkOfType(TasksException::TE_ACCESS_DENIED)) // ... after this
		{
			$result = 'ACCESS_DENIED';
		}
		elseif($e->checkOfType(TasksException::TE_TASK_NOT_FOUND_OR_NOT_ACCESSIBLE))
		{
			$result = 'ACCESS_DENIED.NO_TASK';
		}
	}

	return $result;
}

Добавить комментарий