CustomVarRendererHook: Log an exception's message and location

fixes #5258
This commit is contained in:
Johannes Meyer 2024-11-04 16:19:44 +01:00
parent eef276be93
commit 8f1eaf0c7b
1 changed files with 4 additions and 2 deletions

View File

@ -65,7 +65,8 @@ abstract class CustomVarRendererHook
$hooks[] = $hook; $hooks[] = $hook;
} }
} catch (Exception $e) { } catch (Exception $e) {
Logger::error('Failed to load hook %s:', get_class($hook), $e); Logger::error('Failed to load hook %s: %s', get_class($hook), $e);
Logger::debug($e);
} }
} }
@ -81,7 +82,8 @@ abstract class CustomVarRendererHook
$renderedValue = $hook->renderCustomVarValue($key, $value); $renderedValue = $hook->renderCustomVarValue($key, $value);
$group = $hook->identifyCustomVarGroup($key); $group = $hook->identifyCustomVarGroup($key);
} catch (Exception $e) { } catch (Exception $e) {
Logger::error('Failed to use hook %s:', get_class($hook), $e); Logger::error('Failed to use hook %s: %s', get_class($hook), $e);
Logger::debug($e);
continue; continue;
} }