ErrorException
(PHP 5 >= 5.1.0, PHP 7, PHP 8)
ΠΡΡΡΠΏ
ΠΠΈΠ½ΡΡΠΎΠΊ Ρ ΡΠ°Π·Ρ Π²ΠΈΠ½ΠΈΠΊΠ½Π΅Π½Π½Ρ ΠΏΠΎΠΌΠΈΠ»ΠΊΠΈ.
ΠΠ³Π»ΡΠ΄ ΠΊΠ»Π°ΡΡΠ²
class ErrorException
extends
Exception
{
/* Π‘Π²ΠΎΠΉΡΡΠ²Π° */
protected
int
$severity = E_ERROR;
/* ΠΠ°ΡΠ»Π΅Π΄ΡΠ΅ΠΌΡΠ΅ ΡΠ²ΠΎΠΉΡΡΠ²Π° */
protected
string
$message = "";
private
string
$string = "";
protected
int
$code;
protected
string
$file = "";
protected
int
$line;
private
array
$trace = [];
private
?Throwable
$previous = null;
/* ΠΠ΅ΡΠΎΠ΄Ρ */
public __construct(Β Β Β Β string $message = "",Β Β Β Β int $code = 0,Β Β Β Β int $severity = E_ERROR,Β Β Β Β ?string $filename = null,Β Β Β Β ?int $line = null,Β Β Β Β ?Throwable $previous = null)
final public getSeverity(): int
/* ΠΠ°ΡΠ»Π΅Π΄ΡΠ΅ΠΌΡΠ΅ ΠΌΠ΅ΡΠΎΠ΄Ρ */
final public Exception::getMessage(): string
final public Exception::getPrevious(): ?Throwable
final public Exception::getCode(): int
final public Exception::getFile(): string
final public Exception::getLine(): int
final public Exception::getTrace(): array
final public Exception::getTraceAsString(): string
public Exception::__toString(): string
private Exception::__clone(): void
}
ΠΠ»Π°ΡΡΠΈΠ²ΠΎΡΡΡ
severity
Π‘Π΅ΡΠΉΠΎΠ·Π½ΡΡΡΡ Π²ΠΈΠΊΠ»ΡΡΠ΅Π½Π½Ρ
ΠΡΠΈΠΊΠ»Π°Π΄ΠΈ
ΠΡΠΈΠΊΠ»Π°Π΄ #1 ΠΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅set_error_handler() Π·ΠΌΡΠ½ΠΈΡΠΈ ΠΏΠΎΠ²ΡΠ΄ΠΎΠΌΠ»Π΅Π½Π½Ρ ΠΏΡΠΎ ΠΏΠΎΠΌΠΈΠ»ΠΊΠΈ Π² ErrorException.
Loading...
ΠΠΈΡΠ½ΠΎΠ²ΠΎΠΊ Π½Π°Π²Π΅Π΄Π΅Π½ΠΎΠ³ΠΎ ΠΏΡΠΈΠΊΠ»Π°Π΄Ρ Π±ΡΠ΄Π΅ ΡΡ ΠΎΠΆΠΈΠΌ Π½Π°:
Fatal error: Uncaught exception 'ErrorException' with message 'strpos() expects at least 2 parameters, 0 given' in /home/bjori/tmp/ex.php:12
Stack trace:
#0 [internal function]: exception_error_handler(2, 'strpos() expect...', '/home/bjori/php...', 12, Array)
#1 /home/bjori/php/cleandocs/test.php(12): strpos()
#2 {main}
thrown in /home/bjori/tmp/ex.php on line 12
ΠΠΌΡΡΡ
- ErrorException::__construct - Π‘ΡΠ²ΠΎΡΡΡ Π²ΠΈΠ½ΡΡΠΎΠΊ
- ErrorException::getSeverityβ ΠΡΡΠΈΠΌΡΡ ΡΠ΅ΡΠΉΠΎΠ·Π½ΡΡΡΡ Π²ΠΈΠΊΠ»ΡΡΠ΅Π½Π½Ρ