Skip to content

Commit

Permalink
Merge pull request #6 from KaririCode-Framework/develop
Browse files Browse the repository at this point in the history
fix: add previous in createException method
  • Loading branch information
walmir-silva authored Oct 26, 2024
2 parents ec5d9be + 0ad2e4b commit 581be98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AbstractException.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ protected function addContext(string $key, mixed $value): self
return $this;
}

protected static function createException(int $code, string $errorCode, string $message): self
protected static function createException(int $code, string $errorCode, string $message, ?\Throwable $previous = null): self
{
return new static(new ExceptionMessage($code, $errorCode, $message));
return new static(new ExceptionMessage($code, $errorCode, $message), $previous);
}
}

0 comments on commit 581be98

Please sign in to comment.