method public final

ComponentController::getErrorByCode()

Класс: \Bitrix\Main\Engine\Component\ComponentController

Сигнатура

public final getErrorByCode(string $code) : Error

Описание

Получение единственной ошибки с необходимым кодом.

Параметры

$code string
Код ошибки.

Возвращаемое значение

Error

Как применяется в ComponentController

ComponentController::getErrorByCode() — метод класса \Bitrix\Main\Engine\Component\ComponentController модуля «Главный модуль».

Метод объекта: сначала нужен экземпляр ComponentController.

use Bitrix\Main\Engine\Component\ComponentController;

/** @var ComponentController $object */
$code = '';
$result = $object->getErrorByCode($code);
// $result: Error

Другие методы ComponentController

getErrorByCode() есть и у других классов модуля «Главный модуль»: Action, AjaxJson, Authentication, Base, CloseSession, ClosureAction, ClosureWrapper, Component.

Исходный файл: source/main/lib/engine/component/componentcontroller.php:1109

Что будем искать? Например,Продвижение