Exception class

Exception

Implements: Stringable, Throwable

Properties #

$message
-
$string
-
$code
-
$file
-
$line
-
$trace
-
$previous
-

$message

protected $message = ''

$string

private string $string = ''

$code

protected $code = 0

$file

protected string $file = ''

$line

protected int $line = 0

$trace

private array $trace = array ( )

$previous

private ?Throwable $previous = NULL

Methods #

__construct()
-
__toString()
-
__wakeup()
-
getCode()
-
getFile()
-
getLine()
-
getMessage()
-
getPrevious()
-
getTrace()
-
getTraceAsString()
-
__clone()
-

__construct()

public function __construct(string $message = '', int $code = 0, ?Throwable $previous = NULL)
Parameters
  • string $message
  • int $code
  • ?Throwable $previous

__toString()

public function __toString(): string
Returns string

__wakeup()

public function __wakeup()

getCode()

public final function getCode()

getFile()

public final function getFile(): string
Returns string

getLine()

public final function getLine(): int
Returns int

getMessage()

public final function getMessage(): string
Returns string

getPrevious()

public final function getPrevious(): ?Throwable
Returns ?Throwable

getTrace()

public final function getTrace(): array
Returns array

getTraceAsString()

public final function getTraceAsString(): string
Returns string

__clone()

private function __clone(): void
Returns void