Skip to content

Commit b58ec97

Browse files
committed
Added exceptions hierarchy for backends exceptions not yet migrated classes to it.
1 parent 7d7240f commit b58ec97

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace App\Libs\Exceptions;
6+
7+
use ErrorException;
8+
9+
/**
10+
* Base Exception class for the backends errors.
11+
*/
12+
class BackendException extends ErrorException
13+
{
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace App\Libs\Exceptions;
6+
7+
/**
8+
* Class InvalidArgumentException
9+
*
10+
* This class represents an exception that is thrown by the backend logic.
11+
*/
12+
class InvalidArgumentException extends BackendException
13+
{
14+
}

src/Libs/BackendException.php renamed to src/Libs/Exceptions/RuntimeException.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33
declare(strict_types=1);
44

5-
namespace App\Libs;
6-
7-
use ErrorException;
5+
namespace App\Libs\Exceptions;
86

97
/**
10-
* Class BackendException
8+
* Class RuntimeException
119
*
1210
* This class represents an exception that is thrown by the backend logic.
1311
*/
14-
class BackendException extends ErrorException
12+
class RuntimeException extends BackendException
1513
{
1614
}

0 commit comments

Comments
 (0)