You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have pretty much any coding issue with a Volt component
What happens?
Honeybadger chokes on:
vendor/honeybadger-io/honeybadger-laravel/src/ContextManager.php:64
with:
explode(): Argument #2 ($string) must be of type string, Closure given
What were you expecting to happen?
I'm not sure if you can do something to actually catch these "Closure given" Volt exceptions, they are Symphony ViewExceptions not normal Laravel exceptions, and right now HoneyBadger doesn't catch them. But Telescope does, if HoneyBadager doesn't choke on this one line.
I fixed it by adding this at the beginning of the function:
private function setLaravelRouteActionContext()
{
$route = Route::getCurrentRoute()->getActionName();
if (gettype($route) === 'object' && get_class($route) === 'Closure') {
$reflection = new ReflectionFunction($route);
$className = get_class($reflection->getClosureThis());
if ($className === "Livewire\Volt\VoltManager") {
$routeAction = $reflection->getStaticVariables()['componentName'];
$this->honeybadger->setComponent($routeAction);
return;
}
}
The text was updated successfully, but these errors were encountered:
What are the steps to reproduce this issue?
What happens?
Honeybadger chokes on:
vendor/honeybadger-io/honeybadger-laravel/src/ContextManager.php:64
with:
explode(): Argument #2 ($string) must be of type string, Closure given
What were you expecting to happen?
I'm not sure if you can do something to actually catch these "Closure given" Volt exceptions, they are Symphony ViewExceptions not normal Laravel exceptions, and right now HoneyBadger doesn't catch them. But Telescope does, if HoneyBadager doesn't choke on this one line.
I fixed it by adding this at the beginning of the function:
The text was updated successfully, but these errors were encountered: