public static fromErrorValue ( mixed $err ) : self | ||
$err | mixed | |
Результат | self |
public static function fromErrorValue($err)
{
if (is_object($err)) {
return self::fromType(get_class($err));
}
if (is_array($err)) {
return self::fromType(gettype($err));
}
if (is_string($err)) {
throw new self($err);
}
return self::fromType(var_export($err, true));
}
/** * @param mixed $err * @throws Throwable|\Exception */ private function raiseThrowableFromError($err) { if ($err instanceof Throwable || $err instanceof \Exception) { throw $err; } $this->triggerErrorDeprecation(); throw Exception\MiddlewareException::fromErrorValue($err); }