Skip to content

Commit

Permalink
[3.0] 优化错误捕获处理 (#683)
Browse files Browse the repository at this point in the history
* Update: 优化错误捕获处理

解决错误抑制运算符失效问题

* Update: 修复静态分析
  • Loading branch information
NHZEX authored Mar 20, 2024
1 parent b75f763 commit 061bfb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
class RpcAnnotationParserEvent extends CommonEvent
{
public function __construct(
string $__eventName, ?object $__target = null,
string $__eventName,
?object $__target,
public readonly \Imi\Bean\Annotation\Base $annotation,
public readonly string $className,
public readonly string $target,
Expand Down
4 changes: 4 additions & 0 deletions src/Log/ErrorLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ public function register(): void
*/
public function onError(int $errno, string $errstr, string $errfile, int $errline): void
{
if (0 === (error_reporting() & $errno))
{
return;
}
foreach ($this->errorEventHandlers as $class)
{
$handler = new $class();
Expand Down

0 comments on commit 061bfb2

Please sign in to comment.