Skip to content

Commit 626ec51

Browse files
committed
Root readme updated
1 parent 79226c9 commit 626ec51

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ composer require bsadnu/php-exceptions
1919
- You may use exceptions within the standard throwing/catching mechanism or even extend them in any way you want:
2020

2121
```php
22-
use Bsadnu\Exception\InvalidArgumentException;
22+
use Bsadnu\Exception\Base\InvalidArgumentException;
2323

2424
...
2525

@@ -31,26 +31,24 @@ try {
3131
```
3232

3333
```php
34-
use Bsadnu\Exception\TypeError;
34+
use Bsadnu\Exception\Base\TypeError;
3535

3636
...
3737

3838
throw new TypeError($message);
3939
```
4040

41-
- It is really helpful to catch the base `ExceptionInterface` sometimes. Therefore, you can control a group of exceptions. Moreover, you may add manually as many specific interfaces as you wish.
41+
- It is really helpful to catch either the base `BaseInterface` or any other. Therefore, you can control a group of exceptions. Moreover, you may add manually as many specific interfaces as you wish.
4242

4343
## More detailed description
4444

45-
All exceptions used in this library implements `\Bsadnu\Exception\ExceptionInterface`, and extend one of the SPL extensions. This way, you have several ways of catching specific extension groups:
45+
All exceptions used in this library implements `\Bsadnu\Exception\Interfaces\BaseInterface`, and extend one of the SPL extensions. This way, you have several ways of catching specific extension groups:
4646
1. Catch all exceptions: `\Exception`
4747
2. Catch all exceptions thrown by the library:
48-
`\Bsadnu\Exception\ExceptionInterface`
48+
`\Bsadnu\Exception\Interfaces\BaseInterface`
4949
3. Catch a specific SPL exception: `\LogicException`
50-
4. Catch a specific SPL exception thrown by the library:
51-
`\Bsadnu\Exception\LogicException`
52-
53-
The base `\Bsadnu\Exception\ExceptionInterface` consists of `getUnit/setUnit` methods which can be used to describe the place of code (Unit) where an exception occurs.
50+
4. Catch a specific exception thrown by the library:
51+
`\Bsadnu\Exception\Base\LogicException`
5452

5553
## Contributing
5654

0 commit comments

Comments
 (0)