Skip to content

Commit 005a97c

Browse files
committed
adds 500 error handling.
1 parent a2c65a1 commit 005a97c

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/Mvc/Events/Http500.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
namespace Neuron\Mvc\Events;
4+
5+
use Neuron\Events\IEvent;
6+
7+
/**
8+
* Event generated when a 500 error takes place.
9+
* Happens before the rendering of the error page.
10+
*/
11+
class Http500 implements IEvent
12+
{
13+
public string $route;
14+
public string $exceptionType;
15+
public string $message;
16+
public string $file;
17+
public int $line;
18+
19+
public function __construct( string $route, string $exceptionType, string $message, string $file, int $line )
20+
{
21+
$this->route = $route;
22+
$this->exceptionType = $exceptionType;
23+
$this->message = $message;
24+
$this->file = $file;
25+
$this->line = $line;
26+
}
27+
}

0 commit comments

Comments
 (0)