Skip to content

Commit

Permalink
Add logging to ErrorBoundary
Browse files Browse the repository at this point in the history
  • Loading branch information
arnautov-anton committed Aug 15, 2024
1 parent 4a9e9d7 commit ff3b9a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/UtilityComponents/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export class ErrorBoundary extends Component<ErrorBoundaryProps, { hasError: boo
return { hasError: true };

Check warning on line 13 in src/components/UtilityComponents/ErrorBoundary.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/UtilityComponents/ErrorBoundary.tsx#L13

Added line #L13 was not covered by tests
}

componentDidCatch(error: unknown, information: unknown) {
console.error(error, information);

Check warning on line 17 in src/components/UtilityComponents/ErrorBoundary.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/UtilityComponents/ErrorBoundary.tsx#L17

Added line #L17 was not covered by tests
}

render() {
if (this.state.hasError) {
return this.props.fallback;

Check warning on line 22 in src/components/UtilityComponents/ErrorBoundary.tsx

View check run for this annotation

Codecov / codecov/patch

src/components/UtilityComponents/ErrorBoundary.tsx#L22

Added line #L22 was not covered by tests
Expand Down

0 comments on commit ff3b9a4

Please sign in to comment.