Skip to content

Commit

Permalink
OXDEV-7686 Use graphql-base error class for exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
angel-dimitrov committed Jan 8, 2024
1 parent 4358472 commit 4af43af
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 6 deletions.
8 changes: 7 additions & 1 deletion src/Shared/Exception/CollectionEncodingException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@

namespace OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception;

final class CollectionEncodingException extends \Exception
use OxidEsales\GraphQL\Base\Exception\Error;

final class CollectionEncodingException extends Error
{
public function __construct()
{
parent::__construct('Error encountered while encoding collection data');
}
}
4 changes: 2 additions & 2 deletions src/Shared/Exception/InvalidCollectionException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

namespace OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception;

use Exception;
use OxidEsales\GraphQL\Base\Exception\Error;

final class InvalidCollectionException extends Exception
final class InvalidCollectionException extends Error
{
public function __construct(string $value)
{
Expand Down
8 changes: 7 additions & 1 deletion src/Shared/Exception/NoSettingsFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@

namespace OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception;

class NoSettingsFoundException extends \Exception
use OxidEsales\GraphQL\Base\Exception\NotFound;

class NoSettingsFoundException extends NotFound
{
public function __construct(string $message = 'No settings found')
{
parent::__construct($message);
}
}
8 changes: 7 additions & 1 deletion src/Shared/Exception/WrongSettingValueException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@

namespace OxidEsales\GraphQL\ConfigurationAccess\Shared\Exception;

final class WrongSettingValueException extends \Exception
use OxidEsales\GraphQL\Base\Exception\Error;

final class WrongSettingValueException extends Error
{
public function __construct()
{
parent::__construct('Wrong setting value');
}
}
8 changes: 7 additions & 1 deletion src/Shop/Exception/WrongSettingTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@

namespace OxidEsales\GraphQL\ConfigurationAccess\Shop\Exception;

final class WrongSettingTypeException extends \Exception
use OxidEsales\GraphQL\Base\Exception\Error;

final class WrongSettingTypeException extends Error
{
public function __construct()
{
parent::__construct('Wrong setting type');
}
}

0 comments on commit 4af43af

Please sign in to comment.