Skip to content

Make better use of exceptions#193

Merged
johnbillion merged 17 commits into
developfrom
exceptions
Oct 12, 2025
Merged

Make better use of exceptions#193
johnbillion merged 17 commits into
developfrom
exceptions

Conversation

@johnbillion

@johnbillion johnbillion commented Aug 19, 2025

Copy link
Copy Markdown
Owner

This promotes error conditions within cron callbacks to exceptions which are more likely to be seen in logs and monitoring systems. The exceptions are not caught by WP Crontrol.

This implements a better control structure using exceptions, but it does not leave the exceptions uncaught due to the concerns listed below. Warnings will continue to be triggered as they were prior to this change.

Concerns

If an event triggers an exception:

  • Prevents code after it from running
  • Prevents multiple cron events in one run from running

@johnbillion johnbillion added this to the 1.20.0 milestone Aug 19, 2025
@johnbillion
johnbillion marked this pull request as ready for review October 11, 2025 12:05
@johnbillion
johnbillion merged commit 9e95488 into develop Oct 12, 2025
19 checks passed
@johnbillion
johnbillion deleted the exceptions branch October 12, 2025 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant