PHPackages                             zafarjonovich/php-safe-exception - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. zafarjonovich/php-safe-exception

ActivePackage[Logging &amp; Monitoring](/categories/logging)

zafarjonovich/php-safe-exception
================================

PHP safe exception

0.0.0.2(4y ago)1611PHP

Since Jan 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/zafarjonovich/php-safe-exception)[ Packagist](https://packagist.org/packages/zafarjonovich/php-safe-exception)[ RSS](/packages/zafarjonovich-php-safe-exception/feed)WikiDiscussions main Synced today

READMEChangelog (3)DependenciesVersions (4)Used By (1)

PHP safe exception
==================

[](#php-safe-exception)

Assalomu aleykum. These components will help you hide your exception and save it in your application.

---

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require zafarjonovich/php-safe-exception

```

or add

```
"zafarjonovich/php-safe-exception": "*"

```

to the require section of your `composer.json` file.

Package structure
-----------------

[](#package-structure)

Every exception will converts other specific type. Now this types have:

- Json: \\zafarjonovich\\PHPSafeException\\converter\\JsonConverter::class
- Xml: \\zafarjonovich\\PHPSafeException\\converter\\XMLConverter::class
- Array: \\zafarjonovich\\PHPSafeException\\converter\\ArrayConverter::class
- Text: \\zafarjonovich\\PHPSafeException\\converter\\TextConverter::class

Every converted exception will saves specific places. Now this places have:

- File: \\zafarjonovich\\PHPSafeException\\saver\\FileSaver::class
- Telegram bot: \\zafarjonovich\\PHPSafeException\\saver\\TelegramBotSaver::class

Each saver has a personal configuration, if they are not confugurated, Exception will not be saved

### Configurations

[](#configurations)

- TelegramBotSaver: token and chat\_ids
- FileSaver: filePath or pathGenerator

Usage
-----

[](#usage)

```
