Skip to content

Commit

Permalink
* fix constructor
Browse files Browse the repository at this point in the history
+ change Doc comment
  • Loading branch information
EdmondDantes committed Oct 28, 2024
1 parent ab673c6 commit a83e92b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 1 addition & 8 deletions src/BaseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,7 @@ public function __construct(BaseExceptionInterface|\Throwable|array|string $exce
}

// parent construct
if ($previous instanceof BaseExceptionInterface
&& ($previous instanceof \Throwable) === false) {
parent::__construct($message, $code);

$this->data['previous'] = $previous;
} else {
parent::__construct($message, $code, $previous);
}
parent::__construct($message, $code, $previous);

// The container is never in the journal
if (Registry::$isActive && $this->isLoggable && $this->isContainer === false) {
Expand Down
2 changes: 1 addition & 1 deletion src/ClientException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ClientException extends BaseException implements ClientAvailableInterface
/**
* @param string $template
* @param array<string, scalar|scalar[]> $parameters
* @param array<string, scalar|scalar[]> $debugData
* @param array<string, scalar|mixed[]> $debugData
*/
public function __construct(string $template, array $parameters = [], array $debugData = [])
{
Expand Down

0 comments on commit a83e92b

Please sign in to comment.