Skip to content

Commit

Permalink
IcingaException: Expect \Throwable instead \Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Aug 9, 2023
1 parent 1c80fda commit e95a3f1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions library/Icinga/Exception/IcingaException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

use Exception;
use ReflectionClass;
use Throwable;

class IcingaException extends Exception
{
Expand Down Expand Up @@ -51,11 +52,11 @@ public static function create(array $args)
*
* The format used is: %class% in %path%:%line% with message: %message%
*
* @param Exception $exception
* @param Throwable $exception
*
* @return string
*/
public static function describe(Exception $exception)
public static function describe(Throwable $exception)
{
return sprintf(
'%s in %s:%d with message: %s',
Expand All @@ -70,11 +71,11 @@ public static function describe(Exception $exception)
* Return the same as {@link Exception::getTraceAsString()} for the given exception,
* but show only the types of scalar arguments
*
* @param Exception $exception
* @param Throwable $exception
*
* @return string
*/
public static function getConfidentialTraceAsString(Exception $exception)
public static function getConfidentialTraceAsString(Throwable $exception)
{
$trace = array();

Expand Down

0 comments on commit e95a3f1

Please sign in to comment.