Skip to content

Commit

Permalink
Update: 优化错误捕获处理 (#682)
Browse files Browse the repository at this point in the history
  • Loading branch information
NHZEX authored Mar 20, 2024
1 parent 9acd3d0 commit 55eabb4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Log/ErrorLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public function register(): void
*/
public function onError(int $errno, string $errstr, string $errfile, int $errline): void
{
if (0 === (error_reporting() & $errno))
{
return;
}
if ($this->exceptionLevel & $errno)
{
throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
Expand Down

0 comments on commit 55eabb4

Please sign in to comment.