2020-05-27 16:41:58 +00:00
|
|
|
|
<?php
|
2021-11-18 04:24:30 +00:00
|
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2020-2021 Антон Аксенов (Anthony Axenov)
|
2020-05-27 16:41:58 +00:00
|
|
|
|
*
|
|
|
|
|
* This code is licensed under MIT.
|
|
|
|
|
* Этот код распространяется по лицензии MIT.
|
|
|
|
|
* https://github.com/anthonyaxenov/atol-online/blob/master/LICENSE
|
|
|
|
|
*/
|
|
|
|
|
|
2021-11-18 04:24:30 +00:00
|
|
|
|
declare(strict_types = 1);
|
|
|
|
|
|
2020-05-27 16:41:58 +00:00
|
|
|
|
namespace AtolOnline\Exceptions;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Исключение, возникающее при работе с невалидным JSON
|
|
|
|
|
*/
|
2021-11-18 04:24:30 +00:00
|
|
|
|
class InvalidJsonException extends AtolException
|
2020-05-27 16:41:58 +00:00
|
|
|
|
{
|
|
|
|
|
/**
|
2021-11-22 06:51:10 +00:00
|
|
|
|
* Конструктор
|
2020-05-27 16:41:58 +00:00
|
|
|
|
*/
|
2021-11-22 06:51:10 +00:00
|
|
|
|
public function __construct()
|
2020-05-27 16:41:58 +00:00
|
|
|
|
{
|
2021-11-22 06:51:10 +00:00
|
|
|
|
parent::__construct('[' . json_last_error() . '] ' . json_last_error_msg());
|
2020-05-27 16:41:58 +00:00
|
|
|
|
}
|
2021-11-22 06:51:10 +00:00
|
|
|
|
}
|