Skip to content

Commit 0ad2e4b

Browse files
committed
fix: add previous in createException method
1 parent d4ec148 commit 0ad2e4b

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)