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 Sep 21, 2023
1 parent 036a1fa commit 923c4e3
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 @@ -515,9 +515,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 @@ -674,8 +675,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 @@ -703,6 +705,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 @@ -745,7 +748,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 923c4e3

Please sign in to comment.