improve exceptions

This commit is contained in:
2025-01-07 13:56:51 +01:00
parent 3911584ea7
commit c18c7fb3db
5 changed files with 50 additions and 3 deletions

View File

@ -19,7 +19,7 @@ namespace D3\KlicktippPhpClient\Exceptions;
use Exception;
class BaseException extends Exception
class BaseException extends Exception implements KlicktippExceptionInterface
{
public function __construct($message = "", $code = 0, Exception $previous = null)
{

View File

@ -0,0 +1,24 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\KlicktippPhpClient\Exceptions;
use Assert\LazyAssertionException;
class InvalidCredentialTypeException extends LazyAssertionException implements KlicktippExceptionInterface
{
}

View File

@ -0,0 +1,20 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\KlicktippPhpClient\Exceptions;
interface KlicktippExceptionInterface {}

View File

@ -17,6 +17,8 @@ declare(strict_types=1);
namespace D3\KlicktippPhpClient\Exceptions;
class NoCredentialsException extends BaseException
use Assert\LazyAssertionException;
class NoCredentialsException extends LazyAssertionException implements KlicktippExceptionInterface
{
}