# construct

ErrorException::\_\_construct

Constructs the exception

# 

ENTITY

<div data-wrapper="1" role="ErrorException">

public

</div>

<div data-wrapper="1" role="ErrorException">

ErrorException::\_\_construct

</div>

<div data-wrapper="1" role="ErrorException">

string

</div>

<div data-wrapper="1" role="ErrorException">

message

</div>

<div data-wrapper="1" role="ErrorException">

""

</div>

<div data-wrapper="1" role="ErrorException">

int

</div>

<div data-wrapper="1" role="ErrorException">

code

</div>

<div data-wrapper="1" role="ErrorException">

0

</div>

<div data-wrapper="1" role="ErrorException">

int

</div>

<div data-wrapper="1" role="ErrorException">

severity

</div>

<div data-wrapper="1" role="ErrorException">

E_ERROR

</div>

<div data-wrapper="1" role="ErrorException">

string

</div>

<div data-wrapper="1" role="ErrorException">

null

</div>

<div data-wrapper="1" role="ErrorException">

filename

</div>

<div data-wrapper="1" role="ErrorException">

ENTITY

</div>

<div data-wrapper="1" role="ErrorException">

int

</div>

<div data-wrapper="1" role="ErrorException">

null

</div>

<div data-wrapper="1" role="ErrorException">

line

</div>

<div data-wrapper="1" role="ErrorException">

ENTITY

</div>

<div data-wrapper="1" role="ErrorException">

Throwable

</div>

<div data-wrapper="1" role="ErrorException">

null

</div>

<div data-wrapper="1" role="ErrorException">

previous

</div>

<div data-wrapper="1" role="ErrorException">

ENTITY

</div>

Constructs the Exception.

# 

ENTITY

`message`  
The Exception message to throw.

`code`  
The Exception code.

`severity`  
The severity level of the exception.

> [!NOTE]
> While the severity can be any `int` value, it is intended that the [error constants](#errorfunc.constants) be used.

`filename`  
The filename where the exception is thrown.

`line`  
The line number where the exception is thrown.

`previous`  
The previous exception used for the exception chaining.

# 

ENTITY

| ENTITY | ENTITY |
|----|----|
| 8.0.0 | `filename` and `line` are nullable now. Previously, their defaults were `__FILE__` and `__LINE__`, respectively. |