# ErrorCollection

URL: https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/
Проверено на 1С-Битрикс 25.x, обновлено 03.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией 1С-Битрикс.

Класс `\Bitrix\Lists\Internals\Error\ErrorCollection`
Модуль: Lists.

Исходный файл: `source/lists/lib/internals/error/errorcollection.php:8`

## Методы (18)

- [`__construct()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/__construct/) — Конструктор ErrorCollection.
- [`__unserialize()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/__unserialize/)
- [`add()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/add/) — Добавляет массив ошибок в коллекцию.
- [`addFromResult()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/addfromresult/) — Добавляет ошибки из Main\Entity\Result.
- [`addOne()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/addone/) — Добавляет одну ошибку в коллекцию.
- [`clear()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/clear/)
- [`get()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/get/) — Возвращает любую переменную по её имени. Null, если переменная не задана.
- [`getErrorByCode()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/geterrorbycode/) — Возвращает ошибку с необходимым кодом.
- [`getErrorsByCode()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/geterrorsbycode/) — Возвращает массив ошибок с нужным кодом.
- [`getValues()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/getvalues/)
- [`hasErrors()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/haserrors/) — Возвращает true, если в коллекции есть ошибки.
- [`isEmpty()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/isempty/) — Возвращает true, если словарь пуст.
- [`jsonSerialize()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/jsonserialize/) — JsonSerializable::jsonSerialize — Определяет данные, которые должны быть сериализованы в JSON.
- [`offsetSet()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/offsetset/) — Реализация \ArrayAccess.
- [`set()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/set/)
- [`setError()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/seterror/) — Добавляет ошибку в коллекцию.
- [`setValues()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/setvalues/)
- [`toArray()`](https://chugunov.pro/api-bitrix/lists/internals/error/errorcollection/toarray/) — Возвращает значения в виде массива.

Оригинал в официальной документации: https://docs.1c-bitrix.ru/api/classes/Bitrix-Lists-Internals-Error-ErrorCollection.html
