Commit 3728ba90 authored by Erick Hitter's avatar Erick Hitter
Browse files

For consistency, particularly in logging, fire an action for catchable errors

parent c58428d3
......@@ -280,6 +280,8 @@ class Events extends Singleton {
// Note that timeouts and memory exhaustion do not invoke this block
// Instead, those locks are freed in `do_lock_cleanup_on_shutdown()`
do_action( 'a8c_cron_control_event_threw_catchable_error', $event, $t );
$return = array(
'success' => false,
'message' => sprintf( __( 'Callback for job with action `%1$s` and arguments `%2$s` raised a Throwable - %3$s in %4$s on line %5$d.', 'automattic-cron-control' ), $event->action, maybe_serialize( $event->args ), $t->getMessage(), $t->getFile(), $t->getLine() ),
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment