improve exceptions
This commit is contained in:
parent
3911584ea7
commit
c18c7fb3db
@ -20,7 +20,8 @@
|
|||||||
"composer/composer": "^2.7.1",
|
"composer/composer": "^2.7.1",
|
||||||
"doctrine/collections": "^1.8.0",
|
"doctrine/collections": "^1.8.0",
|
||||||
"guzzlehttp/guzzle": "~7.0",
|
"guzzlehttp/guzzle": "~7.0",
|
||||||
"ext-json": "*"
|
"ext-json": "*",
|
||||||
|
"beberlei/assert": "^3.3"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^9.3",
|
"phpunit/phpunit": "^9.3",
|
||||||
|
@ -19,7 +19,7 @@ namespace D3\KlicktippPhpClient\Exceptions;
|
|||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
|
|
||||||
class BaseException extends Exception
|
class BaseException extends Exception implements KlicktippExceptionInterface
|
||||||
{
|
{
|
||||||
public function __construct($message = "", $code = 0, Exception $previous = null)
|
public function __construct($message = "", $code = 0, Exception $previous = null)
|
||||||
{
|
{
|
||||||
|
24
src/Exceptions/InvalidCredentialTypeException.php
Normal file
24
src/Exceptions/InvalidCredentialTypeException.php
Normal 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
|
||||||
|
{
|
||||||
|
}
|
20
src/Exceptions/KlicktippExceptionInterface.php
Normal file
20
src/Exceptions/KlicktippExceptionInterface.php
Normal 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 {}
|
@ -17,6 +17,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace D3\KlicktippPhpClient\Exceptions;
|
namespace D3\KlicktippPhpClient\Exceptions;
|
||||||
|
|
||||||
class NoCredentialsException extends BaseException
|
use Assert\LazyAssertionException;
|
||||||
|
|
||||||
|
class NoCredentialsException extends LazyAssertionException implements KlicktippExceptionInterface
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user