PHPackages                             volcanus/error - 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. volcanus/error

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

volcanus/error
==============

simple error and exception handler

3.0.0(3y ago)03.5kMITPHP ^8.1

Since Oct 21Compare

[ Source](https://github.com/k-holy/volcanus-error)[ Packagist](https://packagist.org/packages/volcanus/error)[ Docs](https://github.com/k-holy/volcanus-error)[ RSS](/packages/volcanus-error/feed)WikiDiscussions Synced yesterday

READMEChangelog (10)Dependencies (1)Versions (18)Used By (0)

Volcanus\\Error\\ErrorHandler
=============================

[](#volcanuserrorerrorhandler)

[![Latest Stable Version](https://camo.githubusercontent.com/8bd51d287d0170fd53cf3a08db6c176327e2506023900ca5482727bdb61fcb21/68747470733a2f2f706f7365722e707567782e6f72672f766f6c63616e75732f6572726f722f762f737461626c652e706e67)](https://packagist.org/packages/volcanus/error)[![Continuous Integration](https://github.com/k-holy/volcanus-error/actions/workflows/ci.yml/badge.svg)](https://github.com/k-holy/volcanus-error/actions/workflows/ci.yml)

エラーおよび例外処理用クラスです。

以下の機能をサポートしています。

- エラーハンドラ/例外ハンドラとしての機能を提供します。
- ユーザー定義のcallableなエラーログ関数、エラーメッセージ表示関数、エラー画面遷移関数をエラーハンドラ/例外ハンドラで実行します。
- PHPエラーおよび例外メッセージを統一フォーマットに整形します。ユーザー定義のcallableなメッセージフォーマット関数、スタックトレースフォーマット関数を利用することも可能です。
- エラーレベル毎に、エラーログ/エラーメッセージ表示/エラー画面遷移の可否を設定できます。

以下の機能はサポートしません。

- エラー発生時のメール送信…必要に応じてユーザー定義のエラーログ関数で行なって下さい。
- 実行中の環境へのエラーハンドラ/例外ハンドラの設定および解除…必要に応じて利用者自身で行ってください。
- デフォルトのエラーログ関数、エラー画面遷移関数の提供…エラーメッセージ表示関数のみデフォルト実装しています。

以下は利用手順の一例です。

```
