Skip to content

Commit 581be98

Browse files
authored
Merge pull request #6 from KaririCode-Framework/develop
fix: add previous in createException method
2 parents ec5d9be + 0ad2e4b commit 581be98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AbstractException.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ protected function addContext(string $key, mixed $value): self
3636
return $this;
3737
}
3838

39-
protected static function createException(int $code, string $errorCode, string $message): self
39+
protected static function createException(int $code, string $errorCode, string $message, ?\Throwable $previous = null): self
4040
{
41-
return new static(new ExceptionMessage($code, $errorCode, $message));
41+
return new static(new ExceptionMessage($code, $errorCode, $message), $previous);
4242
}
4343
}

0 commit comments

Comments
 (0)