@@ -18,9 +18,8 @@ Para manejar excepciones puedes utilizar la biblioteca
18
18
19
19
---
20
20
21
- - [ Instalación] ( #instalación )
22
21
- [ Requisitos] ( #requisitos )
23
- - [ Cómo empezar ] ( #cómo-empezar )
22
+ - [ Instalación ] ( #instalación )
24
23
- [ Clases disponibles] ( #clases-disponibles )
25
24
- [ Clase ErrorHandler] ( #clase-errorhandler )
26
25
- [ Clase ErrorHandled] ( #clase-errorhandled )
@@ -67,79 +66,71 @@ git clone https://github.com/josantonius/php-error-handler.git
67
66
68
67
### Clase ErrorException
69
68
70
- ``` php
71
- /**
72
- * Esta clase es una extensión de ErrorException.
73
- *
74
- * @see https://www.php.net/manual/en/class.errorexception.php
75
- */
76
- use Josantonius\ErrorHandler\ErrorException;
77
- ```
69
+ ` Josantonius\ErrorHandler\ErrorException ` Extends
70
+ [ ErrorException] ( https://www.php.net/manual/en/class.errorexception.php )
78
71
79
72
Obtener el archivo donde se produjo el error:
80
73
81
74
``` php
82
- $errorHandled-> getFile(): string
75
+ public function getFile(): string;
83
76
```
84
77
85
78
Obtener el nivel del error:
86
79
87
80
``` php
88
- $errorHandled-> getLevel(): int
81
+ public function getLevel(): int;
89
82
```
90
83
91
84
Obtener el la línea donde se produjo el error:
92
85
93
86
``` php
94
- $errorHandled-> getLine(): int
87
+ public function getLine(): int;
95
88
```
96
89
97
90
Obtener el mensaje del error:
98
91
99
92
``` php
100
- $errorHandled-> getMessage(): string
93
+ public function getMessage(): string;
101
94
```
102
95
103
96
Obtener el nombre del error:
104
97
105
98
``` php
106
- $errorHandled-> getName(): string
99
+ public function getName(): string;
107
100
```
108
101
109
102
### Clase ErrorHandled
110
103
111
- ``` php
112
- use Josantonius\ErrorHandler\ErrorHandled;
113
- ```
104
+ ` Josantonius\ErrorHandler\ErrorHandled `
114
105
115
106
Obtener el archivo donde se produjo el error:
116
107
117
108
``` php
118
- $errorHandled-> getFile(): string
109
+ public function getFile(): string;
119
110
```
120
111
121
112
Obtener el nivel del error:
122
113
123
114
``` php
124
- $errorHandled-> getLevel(): int
115
+ public function getLevel(): int;
125
116
```
126
117
127
118
Obtener el la línea donde se produjo el error:
128
119
129
120
``` php
130
- $errorHandled-> getLine(): int
121
+ public function getLine(): int;
131
122
```
132
123
133
124
Obtener el mensaje del error:
134
125
135
126
``` php
136
- $errorHandled-> getMessage(): string
127
+ public function getMessage(): string;
137
128
```
138
129
139
130
Obtener el nombre del error:
140
131
141
132
``` php
142
- $errorHandled-> getName(): string
133
+ public function getName(): string;
143
134
```
144
135
145
136
### Clase ErrorHandler
@@ -156,7 +147,7 @@ Convertir errores en excepciones:
156
147
*
157
148
* @see https://www.php.net/manual/en/errorfunc.constants.php para ver los niveles disponibles.
158
149
*/
159
- $errorHandler-> convertToExceptions(int ...$errorLevel): ErrorHandler
150
+ public function convertToExceptions(int ...$errorLevel): ErrorHandler;
160
151
```
161
152
162
153
Convertir errores en excepciones excepto algunos:
@@ -171,7 +162,7 @@ Convertir errores en excepciones excepto algunos:
171
162
*
172
163
* @see https://www.php.net/manual/en/errorfunc.constants.php para ver los niveles disponibles.
173
164
*/
174
- $errorHandler-> convertToExceptionsExcept(int ...$errorLevel): ErrorHandler
165
+ public function convertToExceptionsExcept(int ...$errorLevel): ErrorHandler;
175
166
```
176
167
177
168
Registrar función para manejar errores:
@@ -182,7 +173,7 @@ Registrar función para manejar errores:
182
173
*
183
174
* @see https://www.php.net/manual/en/functions.first_class_callable_syntax.php
184
175
*/
185
- $errorHandler-> register(callable $callback): ErrorHandler
176
+ public function register(callable $callback): ErrorHandler;
186
177
```
187
178
188
179
Utilizar los informes de errores para determinar qué errores se gestionan:
@@ -195,7 +186,7 @@ Utilizar los informes de errores para determinar qué errores se gestionan:
195
186
*
196
187
* @see https://www.php.net/manual/en/function.error-reporting.php
197
188
*/
198
- $errorHandler-> useErrorReportingLevel(): ErrorHandler
189
+ public function useErrorReportingLevel(): ErrorHandler;
199
190
```
200
191
201
192
## Excepciones utilizadas
0 commit comments