Skip to content

Fix/missing exceptions - #1384

Merged
JaniruTEC merged 8 commits into
developfrom
fix/missing-exceptions
Oct 29, 2020
Merged

JaniruTEC merged 8 commits into
developfrom
fix/missing-exceptions

Conversation

@JaniruTEC

@JaniruTEC JaniruTEC commented Oct 27, 2020 •

Copy link
Copy Markdown
Contributor

Closes #1276

Replaced protected state methods (scheduled, etc.) with lambdas in the constructor
Replaced try-multi-catch with if-instanceof in onFailed-lambda
Added error logging to VaultStats and GeneralPreferencesController
Fixed possible missing error logging in VaultService
Added UI error message to GeneralPreferencesController for ToggleAutoStartTask
Added UI error message to RecoveryKeyCreationController
@JaniruTEC

Copy link
Copy Markdown
Contributor Author

The failed check in eb8f5f5 was a false positive by Snyk.

@overheadhunter overheadhunter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please use the listeners ONLY for behaviour, that you'd be ok with being overwritten by others.

@overheadhunter

Copy link
Copy Markdown
Member

As a general advice: Try to keep PRs focused on the thing you want to implement/fix/change. The more code you change, that is irrelevant to the PR's cause, the more likely you introduce undesired change and the longer the process takes.

@infeo infeo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A good thing, that if an error appears the user will get informed with this PR!

But as pointed out by overheadhunter: Try to focus the PR on the goal it was initally created for. 😉

@JaniruTEC

Copy link
Copy Markdown
Contributor Author

As a general advice: Try to keep PRs focused on the thing you want to implement/fix/change. The more code you change, that is irrelevant to the PR's cause, the more likely you introduce undesired change and the longer the process takes.

But as pointed out by overheadhunter: Try to focus the PR on the goal it was initally created for. 😉

Apologies. I was aiming to generally improve the error handling in the given places instead of just adding the listeners.

@infeo infeo left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I hope i don't nag too much, but what is the reason for the 3 or 4 private constructors (e.g. in the RecoveryKeyCreationController.RecoveryKeyCreationTask ? If it is for the sake of completeness, I suggest to remove them to keep the code clean. On the other hand, if later someone edits them, they directly see what is possible... but thats just a maybe.

Edit: Nevemind, had a wrong understanding 😅

@JaniruTEC
JaniruTEC merged commit 16be3e7 into develop Oct 29, 2020
@JaniruTEC
JaniruTEC deleted the fix/missing-exceptions branch October 29, 2020 16:07
@infeo infeo added this to the 1.5.9 milestone Nov 6, 2020
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.

No UncaughtExceptionHandler/onFailed method for Tasks

3 participants