This repository has been archived on 2025-07-14. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
atol-online/src/Exceptions/AtolException.php
T
anthony 557c76fefa Доработка коллекций и не только
- коллекция `Items` с покрытием
- вынос коллекций из `AtolOnline\Entities` в `AtolOnline\Collections`
- фикс ] в `AtolException`
- финализирован `CorrectionInfo`
- фиксы по тестам коллекций
- прочие мелочи по phpdoc
2021-12-06 16:14:19 +08:00

40 lines
1.0 KiB
PHP

<?php
/*
* Copyright (c) 2020-2021 Антон Аксенов (Anthony Axenov)
*
* This code is licensed under MIT.
* Этот код распространяется по лицензии MIT.
* https://github.com/anthonyaxenov/atol-online/blob/master/LICENSE
*/
declare(strict_types = 1);
namespace AtolOnline\Exceptions;
use Exception;
/**
* Исключение, возникающее при работе с АТОЛ Онлайн
*/
class AtolException extends Exception
{
/**
* @var int[] Теги ФФД
*/
protected array $ffd_tags = [];
/**
* Конструктор
*
* @param string $message Сообщение
* @param int[] $ffd_tags Переопредление тегов ФФД
*/
public function __construct(string $message = '', array $ffd_tags = [])
{
$tags = implode(', ', $ffd_tags ?: $this->ffd_tags);
parent::__construct(
($message ?: $this->message) . ($tags ? ' [Теги ФФД: ' . $tags . ']' : '')
);
}
}