Skip to content

Commit

Permalink
[#134] If check class throws exception, send critical
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewhilton authored and brendanheywood committed Oct 10, 2023
1 parent 08bede3 commit 957f650
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions croncheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@
try {
$checks = \core\check\manager::get_checks('status');
} catch (\Throwable $e) {
$critical = true;
$output .= "Error scanning checks: {$e}\n";
// The check API exploded, so there is no point continuing.
send_critical("Error scanning checks: {$e}\n");
}

// Define a function to get the check result and determine if the error is critical or not.
Expand Down

0 comments on commit 957f650

Please sign in to comment.