Skip to content

Commit

Permalink
make sure failures to perform checks in system report are treated as …
Browse files Browse the repository at this point in the history
…errors (so they will be addressed quickly)
  • Loading branch information
diosmosis committed Oct 20, 2023
1 parent b7a8486 commit ee49691
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions classes/WpMatomo/Admin/SystemReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,10 @@ private function get_matomo_info() {
];
} catch ( Exception $e ) {
$rows[] = [
'name' => esc_html__( 'Matomo System Check', 'matomo' ),
'value' => 'Failed to run Matomo system check.',
'comment' => $e->getMessage(),
'name' => esc_html__( 'Matomo System Check', 'matomo' ),
'value' => 'Failed to run Matomo system check.',
'comment' => $e->getMessage(),
'is_error' => true,
];
}
}
Expand Down Expand Up @@ -676,8 +677,9 @@ private function get_matomo_info() {
} catch (\Exception $e) {
$rows[] = [
'name' => esc_html__( 'Supports Async Archiving', 'matomo' ),
'value' => 'Failed to check if async archiving is supported.',
'value' => 'Could not check if async archiving is supported.',
'comment' => $e->getMessage(),
'is_error' => true,
];
}

Expand Down Expand Up @@ -713,6 +715,7 @@ private function get_matomo_info() {
'name' => 'Location provider ID',
'value' => 'Failed to get the configured Location Provider.',
'comment' => $e->getMessage(),
'is_error' => true,
];
}
}
Expand Down Expand Up @@ -756,7 +759,7 @@ private function get_matomo_info() {
$rows[] = [
'name' => 'Incompatible Matomo plugin check',
'value' => 'Failed to check for incompatible Matomo plugins.',
'is_error' => true, // TODO: use this everywhere there is an exception
'is_error' => true,
'comment' => $e->getMessage(),
];
}
Expand Down

0 comments on commit ee49691

Please sign in to comment.