Skip to content
Snippets Groups Projects
Commit 51dbc37c authored by totten's avatar totten
Browse files

#3502 - CiviEventDispatcher - Tune down the warning

parent bb524026
No related branches found
No related tags found
No related merge requests found
......@@ -193,7 +193,12 @@ class CiviEventDispatcher extends EventDispatcher {
// This condition indicates a structural problem and merits a consistent failure-mode.
// If you believe some special case merits an exemption, then you could add it to `$bootDispatchPolicy`.
throw new \RuntimeException("The event \"$eventName\" attempted to fire before CiviCRM was fully loaded. Skipping.");
// An `Exception` would be ideal for preventing new bugs, but it can be too noisy for systems with pre-existing bugs.
// throw new \RuntimeException("The event \"$eventName\" attempted to fire before CiviCRM was fully loaded. Skipping.");
// Complain to web-user and sysadmin. Log a backtrace. We're pre-boot, so don't use high-level services.
error_log("The event \"$eventName\" attempted to fire before CiviCRM was fully loaded. Skipping.\n" . \CRM_Core_Error::formatBacktrace(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), FALSE));
trigger_error("The event \"$eventName\" attempted to fire before CiviCRM was fully loaded. Skipping.", E_USER_WARNING);
return $event;
default:
throw new \RuntimeException("The dispatch policy for \"$eventName\" is unrecognized ($mode).");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment