Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
bb524026
Commit
bb524026
authored
2 years ago
by
totten
Browse files
Options
Downloads
Patches
Plain Diff
#3502
- CiviEventDispatcher - Tweak error message. Add explanation.
parent
1eb7f2b3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Civi/Core/CiviEventDispatcher.php
+7
-1
7 additions, 1 deletion
Civi/Core/CiviEventDispatcher.php
with
7 additions
and
1 deletion
Civi/Core/CiviEventDispatcher.php
+
7
−
1
View file @
bb524026
...
...
@@ -187,7 +187,13 @@ class CiviEventDispatcher extends EventDispatcher {
throw
new
\RuntimeException
(
"The dispatch policy prohibits event
\"
$eventName
\"
."
);
case
'not-ready'
:
throw
new
\RuntimeException
(
"CiviCRM has not bootstrapped sufficiently to fire event
\"
$eventName
\"
."
);
// The system is not ready to run hooks -- eg it has not finished loading the extension main-files.
// If you fire a hook at this point, it will not be received by the intended listeners.
// In practice, many hooks involve cached data-structures, so a premature hook is liable to have spooky side-effects.
// 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."
);
default
:
throw
new
\RuntimeException
(
"The dispatch policy for
\"
$eventName
\"
is unrecognized (
$mode
)."
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment