Skip to content

Commit e30df1a

Browse files
authored
Merge pull request #149 from inxilpro/settledresult-throw-bc-fix
Add default value for `$numberOfBacktraces` in `SettledResult::throw`
2 parents e63a12f + 0fc0ac3 commit e30df1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Results/SettledResult.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ public function toResponse($request)
9999
*
100100
* @throws Exception
101101
*/
102-
public function throw(?int $numberOfBacktraces)
102+
public function throw(?int $numberOfBacktraces = null)
103103
{
104104
if (!$this->isError()) {
105105
return $this;
106106
}
107107

108108
throw new LambdaExecutionException(sprintf('Lambda Execution Exception for %s: "%s".', ...[
109109
get_class($this->function),
110-
$this->errorAsString($numberOfBacktraces)
110+
$this->errorAsString($numberOfBacktraces ?? 2)
111111
]));
112112
}
113113

0 commit comments

Comments
 (0)