Skip to content

Log error when throwing exception#13910

Merged
zwarm merged 7 commits intodevelopfrom
issue/13328-13329-backup-restore-error-logging
Feb 1, 2021
Merged

Log error when throwing exception#13910
zwarm merged 7 commits intodevelopfrom
issue/13328-13329-backup-restore-error-logging

Conversation

@zwarm
Copy link
Copy Markdown
Contributor

@zwarm zwarm commented Jan 28, 2021

Parent #13328 & #13329

This PR logs an error when:

  1. An exception is thrown while checking for required intent parameters
  2. When GetBackupDownloadStatusUseCase exceeds the retry limit

Please let me know if you feel this code is overkill.

Notes
I was too optimistic with this PR. The AppLog is in WordPress.Utils and I not realize that there is already a PR out there that updated values, but that PR hasn't been merged yet. I have a request out to figure out how to get that pushed, then I will come back and update this one with the tag names.

To test:

  • I couldn't find a way to test this without adding code to force an error, so there is nothing to test in this PR

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@zwarm zwarm added this to the 16.7 milestone Jan 28, 2021
@zwarm zwarm requested review from a team and ParaskP7 and removed request for a team January 28, 2021 18:30
@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Jan 28, 2021

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

Copy link
Copy Markdown
Contributor

@ParaskP7 ParaskP7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 @zwarm !

I am just leaving a Comment here and not approving yet since the CI is not building due to what you have noted in the PR description. When this is ready again, let me and I'll approve right afterwards.

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Jan 29, 2021

You can test the changes on this Pull Request by downloading the APK here.

@ParaskP7 ParaskP7 self-assigned this Feb 1, 2021
Copy link
Copy Markdown
Contributor

@ParaskP7 ParaskP7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 @zwarm !

I am approving this PR, I bet it wasn't fun on your part to go through all these for such a simple change. 😅

Since I don't have the full context here, I am going to let you merge that to develop when you know it is the right time (don't want to break anything myself).

}
else -> {
AppLog.e(T.JETPACK_RESTORE, "Error initializing ${this.javaClass.simpleName}")
AppLog.e(T.JETPACK_REWIND, "Error initializing ${this.javaClass.simpleName}")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question (❓): Why did this change to REWIND? Since rewind is used in general with backup download as well, as a term that is (like rewindId), I think it is better if we use RESTORE as a naming convention on restore specific cases. I try to do that everywhere, when refactoring field, parameters, functions, etc. Thus, I asking this question to understand if I am missing any information in regards to that.

Copy link
Copy Markdown
Contributor Author

@zwarm zwarm Feb 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this change to REWIND?

Because I chose RESTORE before I realized that the value was already defined in Utils. I used the value that was preexisting.

@zwarm zwarm merged commit fb45861 into develop Feb 1, 2021
@zwarm zwarm deleted the issue/13328-13329-backup-restore-error-logging branch February 1, 2021 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants