Skip to content

Commit

Permalink
Implement try in checks preparation
Browse files Browse the repository at this point in the history
  • Loading branch information
ernilambar committed Jan 10, 2024
1 parent cf35624 commit 387df3e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions includes/Checker/Abstract_Check_Runner.php
Expand Up @@ -281,9 +281,13 @@ final public function set_categories( $categories ) {
* @throws Exception Thrown exception when preparation fails.
*/
final public function prepare() {
if ( $this->has_runtime_check( $this->get_checks_to_run() ) ) {
$preparation = new Universal_Runtime_Preparation( $this->get_check_context() );
return $preparation->prepare();
try {
if ( $this->has_runtime_check( $this->get_checks_to_run() ) ) {
$preparation = new Universal_Runtime_Preparation( $this->get_check_context() );
return $preparation->prepare();
}
} catch ( Exception $error ) {

Check warning on line 289 in includes/Checker/Abstract_Check_Runner.php

View check run for this annotation

Codecov / codecov/patch

includes/Checker/Abstract_Check_Runner.php#L289

Added line #L289 was not covered by tests
// Ignore for now.
}

return function () {};
Expand Down

0 comments on commit 387df3e

Please sign in to comment.