Skip to content

Commit 1f66418

Browse files
committed
Convert errors to exceptions
1 parent 1ddedf4 commit 1f66418

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/Zack.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ public function run(): void
3434
ini_set('log_errors', $this->config->php->logErrors ? '1' : '0');
3535
ini_set('error_log', $this->config->php->errorLog);
3636

37+
set_error_handler(function (int $severity, string $message, string $file = '', int $line = 0) {
38+
throw new \ErrorException($message, 0, $severity, $file, $line);
39+
}, $this->config->php->errorReporting);
40+
3741
$this->initContainer();
3842

3943
$request = HttpFoundation\Request::createFromGlobals();

0 commit comments

Comments
 (0)