You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- in `config/config.php` add `\Dot\ErrorHandler\ConfigProvider`
33
33
- in `config/pipeline.php` add `\Dot\ErrorHandler\ErrorHandlerInterface::class`
34
34
- the interface is used as an alias to keep all error handling related configurations in one file
35
-
-**IMPORTANT NOTE** there should be no other error handlers after this one (only before) because the other error handler will catch the error causing dot-errorhandler not to catch any error, we recommend using just one error handler unless you have an error-specific handler
35
+
36
+
> If you need other error handlers, you should place them before dot-errorhandler in the pipeline; else it will not be able to catch errors.
37
+
> We recommend using just one error handler unless you have an error-specific handler.
36
38
37
39
- Configure the error handler as shown below.
38
40
39
-
In **config/autoload/error-handling.global.php**:
41
+
In `config/autoload/error-handling.global.php`:
40
42
41
43
```php
42
44
<?php
@@ -61,17 +63,13 @@ return [
61
63
62
64
A configuration example for the default logger can be found in `config/log.global.php.dist`.
63
65
64
-
When declaring the `ErrorHandlerInterface` alias you can choose whether to log or not:
65
-
66
-
- for logging use `LogErrorHandler`
67
-
- for the simple Zend Expressive handler user `ErrorHandler`
68
-
69
-
The class `Dot\ErrorHandler\ErrorHandler` is the same as the Zend Expressive error handling class the only difference being the removal of the `final` statement for making extension possible.
66
+
When configuring the error handler in your application, you can choose between two classes:
70
67
71
-
The class `Dot\ErrorHandler\LogErrorHandler` is `Dot\ErrorHandler\ErrorHandler` with added logging support.
68
+
-`Dot\ErrorHandler\LogErrorHandler`: for logging and displaying errors
69
+
-`Dot\ErrorHandler\ErrorHandler`: for displaying errors only
72
70
73
-
As a note: both`LogErrorHandler` and `ErrorHandler` have factories declared in the package's `ConfigProvider`.
74
-
If you need a custom ErrorHandler it must have a factory declared in the config, as in the below example:
71
+
> Both`LogErrorHandler` and `ErrorHandler` have factories declared in the package's `ConfigProvider`.
72
+
> If you need a custom ErrorHandler, it must have a factory declared in the config, as in the below example:
Copy file name to clipboardExpand all lines: docs/book/v3/configuration.md
+7-14Lines changed: 7 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,17 +29,13 @@ return [
29
29
30
30
A configuration example for the default logger can be found in `config/log.global.php.dist`.
31
31
32
-
When declaring the `ErrorHandlerInterface` alias you can choose whether to log or not:
32
+
When configuring the error handler in your application, you can choose between two classes:
33
33
34
-
- for the simple Zend Expressive handler user `ErrorHandler`
35
-
- for logging use `LogErrorHandler`
34
+
-`Dot\ErrorHandler\LogErrorHandler`: for logging and displaying errors
35
+
-`Dot\ErrorHandler\ErrorHandler`: for displaying errors only
36
36
37
-
The class `Dot\ErrorHandler\ErrorHandler` is the same as the Zend Expressive error handling class the only difference being the removal of the `final` statement for making extension possible.
38
-
39
-
The class `Dot\ErrorHandler\LogErrorHandler` is `Dot\ErrorHandler\ErrorHandler` with added logging support.
40
-
41
-
As a note: both `LogErrorHandler` and `ErrorHandler` have factories declared in the package's `ConfigProvider`.
42
-
If you need a custom ErrorHandler it must have a factory declared in the config, as in the below example:
37
+
> Both `LogErrorHandler` and `ErrorHandler` have factories declared in the package's `ConfigProvider`.
38
+
> If you need a custom ErrorHandler, it must have a factory declared in the config, as in the below example:
43
39
44
40
```php
45
41
<?php
@@ -48,21 +44,18 @@ use Dot\ErrorHandler\ErrorHandlerInterface;
Copy file name to clipboardExpand all lines: docs/book/v3/overview.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,5 +2,9 @@
2
2
3
3
`dot-errorhandler` is Dotkernel's logging error handler, providing two options:
4
4
5
-
-`Dot\ErrorHandler\ErrorHandler`, same as the Zend Expressive error handling class with the only difference being the removal of the `final` statement for making extension possible
5
+
## Features
6
+
7
+
This package provides two features:
8
+
9
+
-`Dot\ErrorHandler\ErrorHandler`, same as the Mezzio error handling class with the only difference being the removal of the `final` statement for making extension possible
6
10
-`Dot\ErrorHandler\LogErrorHandler` adds logging support to the default `ErrorHandler` class
Copy file name to clipboardExpand all lines: docs/book/v4/configuration.md
+7-14Lines changed: 7 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,17 +29,13 @@ return [
29
29
30
30
A configuration example for the default logger can be found in `config/log.global.php.dist`.
31
31
32
-
When declaring the `ErrorHandlerInterface` alias you can choose whether to log or not:
32
+
When configuring the error handler in your application, you can choose between two classes:
33
33
34
-
- for the simple Zend Expressive handler user `ErrorHandler`
35
-
- for logging use `LogErrorHandler`
34
+
-`Dot\ErrorHandler\LogErrorHandler`: for logging and displaying errors
35
+
-`Dot\ErrorHandler\ErrorHandler`: for displaying errors only
36
36
37
-
The class `Dot\ErrorHandler\ErrorHandler` is the same as the Zend Expressive error handling class the only difference being the removal of the `final` statement for making extension possible.
38
-
39
-
The class `Dot\ErrorHandler\LogErrorHandler` is `Dot\ErrorHandler\ErrorHandler` with added logging support.
40
-
41
-
As a note: both `LogErrorHandler` and `ErrorHandler` have factories declared in the package's `ConfigProvider`.
42
-
If you need a custom ErrorHandler it must have a factory declared in the config, as in the below example:
37
+
> Both `LogErrorHandler` and `ErrorHandler` have factories declared in the package's `ConfigProvider`.
38
+
> If you need a custom ErrorHandler, it must have a factory declared in the config, as in the below example:
43
39
44
40
```php
45
41
<?php
@@ -48,21 +44,18 @@ use Dot\ErrorHandler\ErrorHandlerInterface;
Copy file name to clipboardExpand all lines: docs/book/v4/overview.md
+1-4Lines changed: 1 addition & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,6 @@
2
2
3
3
`dot-errorhandler` is Dotkernel's logging error handler, providing two options:
4
4
5
-
-`Dot\ErrorHandler\ErrorHandler`, same as the Zend Expressive error handling class with the only difference being the removal of the `final` statement for making extension possible
6
-
-`Dot\ErrorHandler\LogErrorHandler` adds logging support to the default `ErrorHandler` class
-`Dot\ErrorHandler\ErrorHandler`, same as the Zend Expressive error handling class with the only difference being the removal of the `final` statement for making extension possible
23
+
-`Dot\ErrorHandler\ErrorHandler`, same as the Mezzio error handling class with the only difference being the removal of the `final` statement for making extension possible
27
24
-`Dot\ErrorHandler\LogErrorHandler` adds logging support to the default `ErrorHandler` class
28
25
29
26
> Versions **>=4.0.0** and **<4.1.0** use laminas/laminas-servicemanager **3.x**
0 commit comments