Skip to content

Commit

Permalink
Add throws tag and catch exception
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeccanici committed Dec 29, 2023
1 parent 38c2fd3 commit aa9dc1a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Services/ImpersonateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ public function leave(): bool
return true;
}

/**
* @throws Exception
*/
public function clear()
{
session()->forget($this->getSessionKey());
Expand Down Expand Up @@ -206,7 +209,7 @@ public function getLeaveRedirectTo(): string
}

$uri = route(config('laravel-impersonate.leave_redirect_to'));
} catch (\InvalidArgumentException $e) {
} catch (\InvalidArgumentException|Exception $e) {
$uri = config('laravel-impersonate.leave_redirect_to');
}

Expand Down

0 comments on commit aa9dc1a

Please sign in to comment.